We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3504402 commit c92086bCopy full SHA for c92086b
libs/structs/structvar/structvar.go
@@ -46,6 +46,9 @@ func (sv *StructVar) Load(typ reflect.Type) error {
46
if sv.valueCache != nil {
47
return nil // Already loaded
48
}
49
+ if typ.Kind() != reflect.Pointer {
50
+ return fmt.Errorf("expecting pointer, got %s", typ.Kind())
51
+ }
52
ptr := reflect.New(typ.Elem())
53
if err := json.Unmarshal(sv.Value, ptr.Interface()); err != nil {
54
return err
0 commit comments