You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using GOLANG's encoding for JSON and the datatype is Time. "omitempty"
does not work. It always emits the default value '0001-01-01 00:00:00 +0000 UTC'. This
is not working as expected(http://play.golang.org/p/vHLyeMwwTX).
type Stuff struct {
Cloned time.Time `json:"cloned,omitempty"`
Expiration time.Time `json:"expiration,omitempty"`
}
What is the expected output?
-I expected the default value of time.Time to be empty.
What do you see instead?
0001-01-01 00:00:00 +0000 UTC
Which compiler are you using (5g, 6g, 8g, gccgo)?
6
Which operating system are you using?
Win
Which version are you using? (run 'go version')
go1.0.3
Please provide any additional information below.
The text was updated successfully, but these errors were encountered:
by [email protected]:
The text was updated successfully, but these errors were encountered: