funcr: Check CanInterface() on struct fields
Tim Hockin
2 years ago
356 | 356 | // reflect says this field is only defined for non-exported fields. |
357 | 357 | continue |
358 | 358 | } |
359 | if !v.Field(i).CanInterface() { | |
360 | // reflect isn't clear exactly what this means, but we can't use it. | |
361 | continue | |
362 | } | |
359 | 363 | name := fld.Name |
360 | 364 | omitempty := false |
361 | 365 | if tag, found := fld.Tag.Lookup("json"); found { |