From 94acb6ee4ab21800c4fbd0d6d94dbfb15c686366 Mon Sep 17 00:00:00 2001 From: Denys Smirnov Date: Mon, 17 Oct 2016 17:12:29 +0300 Subject: [PATCH] add helper to check for zero uuid --- ioctl_h.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ioctl_h.go b/ioctl_h.go index 0691e89..e460c89 100644 --- a/ioctl_h.go +++ b/ioctl_h.go @@ -25,8 +25,9 @@ var zeroUUID UUID type UUID [UUIDSize]byte +func (id UUID) IsZero() bool { return id == zeroUUID } func (id UUID) String() string { - if id == zeroUUID { + if id.IsZero() { return "" } buf := make([]byte, UUIDSize*2+4)