Closed hktalent closed 11 months ago
Unexpected results occur when passing based on pointer
if ps, err := gojq.Parse(path); nil == err { if data := ps.Run(source); nil != data { if o, ok := data.Next(); ok { return o } } }
now if source is &map[string]interface{}{} so: fmt.Sprintf("%v",o) like this:
%!v(PANIC=Error method: invalid type: reflect.Value (map[cve:map[CVE_data_meta:map[.......]]))
If I don't pass based on pointer, everything works fine
fixed
if m1,ok:=source.(*map[string]interface{});ok{ source = *m1 }
Unexpected results occur when passing based on pointer
now if source is &map[string]interface{}{} so: fmt.Sprintf("%v",o) like this:
%!v(PANIC=Error method: invalid type: reflect.Value (map[cve:map[CVE_data_meta:map[.......]]))
If I don't pass based on pointer, everything works fine