From 8ef8e04fbc2c2158fffce30b05e668afc29d855d Mon Sep 17 00:00:00 2001 From: Tao Wen Date: Mon, 5 Dec 2016 10:49:33 +0800 Subject: [PATCH] update README --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index b96f502..a4e9840 100644 --- a/README.md +++ b/README.md @@ -14,17 +14,17 @@ type StructOfTag struct { } func Test_reflect_struct_tag_field(t *testing.T) { - jsoniter.Unmarshal(`{"field-1": "hello", "field2": "", "field3": "100"}`, &struct_) + err := jsoniter.Unmarshal(`{"field-1": "hello", "field2": "", "field3": "100"}`, &struct_) if struct_.field1 != "hello" { - fmt.Println(iter.Error) + fmt.Println(err) t.Fatal(struct_.field1) } if struct_.field2 != "world" { - fmt.Println(iter.Error) + fmt.Println(err) t.Fatal(struct_.field2) } if struct_.field3 != 100 { - fmt.Println(iter.Error) + fmt.Println(err) t.Fatal(struct_.field3) } }