Pārlūkot izejas kodu

Update comment for compareNodes

Raul Silvera 9 gadus atpakaļ
vecāks
revīzija
ca80a12349
1 mainītis faili ar 2 papildinājumiem un 0 dzēšanām
  1. 2
    0
      internal/graph/graph.go

+ 2
- 0
internal/graph/graph.go Parādīt failu

825
 	return nil
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
 func compareNodes(l, r *Node) bool {
830
 func compareNodes(l, r *Node) bool {
829
 	return fmt.Sprint(l.Info) < fmt.Sprint(r.Info)
831
 	return fmt.Sprint(l.Info) < fmt.Sprint(r.Info)
830
 }
832
 }