generativist / til

Go's time Package has an IsZero() Method

Or, I've Been Doing Things Wrong For a While

This is how I’ve been doing things,

import "time"

var ZeroTime = time.Time{}

gotTime := time.Time{}
gotTime == ZeroTime

and here is the better way,

gotTime.IsZero()

Oh, the things we learn…