Skip to content

Commit 94acb6e

Browse files
committed
add helper to check for zero uuid
1 parent 6f59d60 commit 94acb6e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ioctl_h.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,9 @@ var zeroUUID UUID
2525

2626
type UUID [UUIDSize]byte
2727

28+
func (id UUID) IsZero() bool { return id == zeroUUID }
2829
func (id UUID) String() string {
29-
if id == zeroUUID {
30+
if id.IsZero() {
3031
return "<zero>"
3132
}
3233
buf := make([]byte, UUIDSize*2+4)

0 commit comments

Comments
 (0)