Skip to content

Commit

Permalink
Added IsZero(), alias of IsNil() (#90)
Browse files Browse the repository at this point in the history
  • Loading branch information
Webbmekanikern authored Oct 27, 2022
1 parent 1b855c3 commit e6fb919
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions id.go
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,11 @@ func (id ID) IsNil() bool {
return id == nilID
}

// Alias of IsNil
func (id ID) IsZero() bool {
return id.IsNil()
}

// NilID returns a zero value for `xid.ID`.
func NilID() ID {
return nilID
Expand Down

0 comments on commit e6fb919

Please sign in to comment.