diff --git a/dag/edge.go b/dag/edge.go index c425d5e5d..f0d99ee3a 100644 --- a/dag/edge.go +++ b/dag/edge.go @@ -9,7 +9,7 @@ type Edge interface { Source() Vertex Target() Vertex - hashable + Hashable } // BasicEdge returns an Edge implementation that simply tracks the source diff --git a/dag/set.go b/dag/set.go index 8e9f3c410..2b1d7f21b 100644 --- a/dag/set.go +++ b/dag/set.go @@ -10,10 +10,10 @@ type Set struct { once sync.Once } -// hashable is the interface used by set to get the hash code of a value. +// Hashable is the interface used by set to get the hash code of a value. // If this isn't given, then the value of the item being added to the set // itself is used as the comparison value. -type hashable interface { +type Hashable interface { Hashcode() interface{} } @@ -60,7 +60,7 @@ func (s *Set) List() []interface{} { } func (s *Set) code(v interface{}) interface{} { - if h, ok := v.(hashable); ok { + if h, ok := v.(Hashable); ok { return h.Hashcode() }