From 9f20d19e75559d7e49e63c378f1bc7902556df6c Mon Sep 17 00:00:00 2001 From: Felix Lange Date: Tue, 7 Mar 2017 13:24:29 +0100 Subject: [PATCH] fix small nits in godoc --- main.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/main.go b/main.go index 3d15c03..7019bce 100644 --- a/main.go +++ b/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) } ... }