dag: export more things
This commit is contained in:
parent
119d5a09cf
commit
5c2639bd10
|
@ -9,7 +9,7 @@ type Edge interface {
|
|||
Source() Vertex
|
||||
Target() Vertex
|
||||
|
||||
hashable
|
||||
Hashable
|
||||
}
|
||||
|
||||
// BasicEdge returns an Edge implementation that simply tracks the source
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue