Closed NOMORECOFFEE closed 5 years ago
Why? Elem panics if it's not an interface or a pointer; we break the loop if v is neither an interface nor a pointer. Looks right to me.
OR wouldn't break the loop only if v's kind isn't a ptr and an interface at the same time.
@utrack you are right. Sorry for issue
https://github.com/utrack/clay/blob/master/transport/httpruntime/mjson.go#L41 it's not correct logical operator
&&
forv = v.Elem()
invoked herehttps://golang.org/pkg/reflect/#Value.Elem It panics if v's Kind is not Interface OR Ptr.
I think it should be
||