update gtime example

This commit is contained in:
ansionfor
2021-11-30 22:53:28 +08:00
parent 6acb2f46e6
commit 0340fb7124

View File

@ -490,9 +490,8 @@ func ExampleTime_UnmarshalJSON() {
p := new(Person)
src := `{"name":"goframe","birthday":"2018-08-08 08:08:08"}`
json.Unmarshal([]byte(src), p)
js, _ := json.Marshal(p)
fmt.Println(string(js))
// Output:
// {"name":"goframe","birthday":"2018-08-08 08:08:08"}
fmt.Println(p)
// Output
// &{goframe 2018-08-08 08:08:08}
}