mirror of
https://github.com/dennwc/btrfs
synced 2025-01-09 08:39:23 +00:00
add helper to check for zero uuid
This commit is contained in:
parent
6f59d604fc
commit
94acb6ee4a
@ -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 "<zero>"
|
||||
}
|
||||
buf := make([]byte, UUIDSize*2+4)
|
||||
|
Loading…
Reference in New Issue
Block a user