fix small nits in godoc

master
Felix Lange 8 years ago
parent ee3195a59d
commit 9f20d19e75
  1. 6
      main.go

@ -22,7 +22,7 @@ Example:
type foo struct {
Required string
Optional string `optional:""`
Optional string `optional:"true"`
Renamed string `json:"otherName"`
}
@ -89,8 +89,8 @@ The generated code is similar to this snippet:
func (f *Foo2) UnmarshalJSON(input []byte) error {
var dec struct{ M map[string]specialString }
...
for key, _ := range dec.M {
f.M[key] = string(dec.M[key])
for k, v := range dec.M {
f.M[k] = string(v)
}
...
}

Loading…
Cancel
Save