in.Delim('{')
for !in.IsDelim('}') {
key := in.UnsafeFieldName(false)
in.WantColon()
if in.IsNull() {
in.Skip()
in.WantComma()
continue
}
switch key {
case "ErrId":
out.ErrId = string(in.String())
case "ErrMessage":
out.ErrMessage = string(in.String())
default:
in.SkipRecursive()
}
in.WantComma()
}
in.Delim('}')
I am wondering why the code generator doesn't just generate map/hash lookup calls and avoid a for-loop altogether? Might be a good reason, not sure yet
there's a for loop here for every call, like so:
I am wondering why the code generator doesn't just generate map/hash lookup calls and avoid a for-loop altogether? Might be a good reason, not sure yet
so instead, would look like this:
if a field had no value, then I guess zero value is ok?