We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 761e8a6 commit 4528796Copy full SHA for 4528796
1 file changed
gotojs.go
@@ -47,8 +47,10 @@ func (tracker *Tracker[T]) StructToJSObjectValue(
47
// Determine the struct type and value for field processing:
48
// - pointer to struct: dereference for field processing.
49
// - direct struct: use as-is.
50
- var structType reflect.Type
51
- var structVal reflect.Value
+ var (
+ structType reflect.Type
52
+ structVal reflect.Value
53
+ )
54
55
if rtype.Kind() == reflect.Ptr {
56
structType = rtype.Elem()
@@ -410,7 +412,6 @@ func (tracker *Tracker[T]) addStructMethodsToObject(
410
412
rtype reflect.Type,
411
413
rval reflect.Value,
414
) error {
-
415
for i := range rtype.NumMethod() {
416
method := rtype.Method(i)
417
methodValue := rval.Method(i)
0 commit comments