dag: export more things

This commit is contained in:
Mitchell Hashimoto 2015-02-13 14:12:23 -08:00
parent 119d5a09cf
commit 5c2639bd10
2 changed files with 4 additions and 4 deletions

View File

@ -9,7 +9,7 @@ type Edge interface {
Source() Vertex
Target() Vertex
hashable
Hashable
}
// BasicEdge returns an Edge implementation that simply tracks the source

View File

@ -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()
}