Skip to content

Commit

Permalink
Update ulid.go
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbourgon authored Apr 13, 2024
1 parent 54fb474 commit 03d0655
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ulid.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ func (id ULID) Timestamp() time.Time {

// IsZero returns true if the ULID is a zero-value ULID, i.e. ulid.Zero.
func (id ULID) IsZero() bool {
return bytes.Equal(id[:], Nil[:])
return id.Compare(Zero) == 0
}

// maxTime is the maximum Unix time in milliseconds that can be
Expand Down

0 comments on commit 03d0655

Please sign in to comment.