Browse Source

Update comment for compareNodes

Raul Silvera 9 years ago
parent
commit
ca80a12349
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      internal/graph/graph.go

+ 2
- 0
internal/graph/graph.go View File

@@ -825,6 +825,8 @@ func (ns Nodes) Sort(o NodeOrder) error {
825 825
 	return nil
826 826
 }
827 827
 
828
+// compareNodes compares two nodes to provide a deterministic ordering
829
+// between them. Two nodes cannot have the same Node.Info value.
828 830
 func compareNodes(l, r *Node) bool {
829 831
 	return fmt.Sprint(l.Info) < fmt.Sprint(r.Info)
830 832
 }