aboutsummaryrefslogtreecommitdiffstats
path: root/internal/hash.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/hash.go')
-rw-r--r--internal/hash.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/internal/hash.go b/internal/hash.go
index db55b24..0540db1 100644
--- a/internal/hash.go
+++ b/internal/hash.go
@@ -30,6 +30,11 @@ func NewHash(s string) Hash {
return h
}
+func (h Hash) IsZero() bool {
+ var empty Hash
+ return h == empty
+}
+
func (h Hash) String() string {
return hex.EncodeToString(h[:])
}