From 5c2639bd10d3fcc7e1969688d9979e4c41e97901 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Fri, 13 Feb 2015 14:12:23 -0800 Subject: [PATCH] dag: export more things --- dag/edge.go | 2 +- dag/set.go | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) 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() }