Skip to content

Commit 7ab66ea

Browse files
committed
Continue on empty key
1 parent 14e4dee commit 7ab66ea

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pkg/ton/debug/lib/lib.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func DecodeTLBStructKeys(v interface{}, tlbs map[uint64]interface{}) ([]string,
280280
return nil, fmt.Errorf("unable to decode as JSON map - not a structure: type=%T; val=%v", t, rv)
281281
}
282282

283-
out := make([]string, rv.NumField())
283+
out := []string{}
284284
rt := rv.Type()
285285
for i := 0; i < rv.NumField(); i++ {
286286
sf := rt.Field(i)
@@ -296,6 +296,10 @@ func DecodeTLBStructKeys(v interface{}, tlbs map[uint64]interface{}) ([]string,
296296
k = strings.Split(jsonTag, ",")[0] // parse json tag options (key)
297297
}
298298

299+
if k == "" {
300+
continue
301+
}
302+
299303
out = append(out, k)
300304
}
301305
return out, nil

0 commit comments

Comments
 (0)