浏览代码

Update comment for compareNodes

Raul Silvera 9 年前
父节点
当前提交
ca80a12349
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2
    0
      internal/graph/graph.go

+ 2
- 0
internal/graph/graph.go 查看文件

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
 }