Skip to content

Commit 65eac4d

Browse files
committed
Updated documentation with convenience function
1 parent aca1ef7 commit 65eac4d

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

ulid.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -520,12 +520,10 @@ func (id *ULID) Scan(src interface{}) error {
520520
// error. If your use case requires zero-value ULIDs to return a non-nil error,
521521
// you can create a wrapper type that special-cases this behavior.
522522
//
523-
// var zeroValueULID ulid.ULID
524-
//
525523
// type invalidZeroValuer ulid.ULID
526524
//
527525
// func (v invalidZeroValuer) Value() (driver.Value, error) {
528-
// if ulid.ULID(v).Compare(zeroValueULID) == 0 {
526+
// if ulid.ULID(v).IsZero() {
529527
// return nil, fmt.Errorf("zero value")
530528
// }
531529
// return ulid.ULID(v).Value()

0 commit comments

Comments
 (0)