-
-
Save tebeka/ef11a55afecbbc10228d935b0b602134 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t1 := time.Now() | |
data, err := json.Marshal(t1) | |
if err != nil { | |
log.Fatal(err) | |
} | |
var t2 time.Time | |
if err := json.Unmarshal(data, &t2); err != nil { | |
log.Fatal(err) | |
} | |
fmt.Println(t1 == t2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment