Browse code

graphapi: Remove dead code and add godoc

Michail Kargakis authored on 2015/12/21 18:18:37
Showing 1 changed files
... ...
@@ -2,7 +2,6 @@ package graph
2 2
 
3 3
 import (
4 4
 	"fmt"
5
-	"io"
6 5
 	"sort"
7 6
 	"strings"
8 7
 
... ...
@@ -142,7 +141,8 @@ func New() Graph {
142 142
 	}
143 143
 }
144 144
 
145
-// Edges returns all the edges of the graph
145
+// Edges returns all the edges of the graph. Note that the returned set
146
+// will have no specific ordering.
146 147
 func (g Graph) Edges() []graph.Edge {
147 148
 	return g.internal.Edges()
148 149
 }
... ...
@@ -643,14 +643,3 @@ func pathEqual(a, b []graph.Node) bool {
643 643
 	}
644 644
 	return true
645 645
 }
646
-
647
-func Fprint(out io.Writer, g Graph) {
648
-	for _, node := range g.Nodes() {
649
-		fmt.Fprintf(out, "node %d %s\n", node.ID(), node)
650
-	}
651
-	for _, edge := range g.Edges() {
652
-		for _, edgeKind := range g.EdgeKinds(edge).List() {
653
-			fmt.Fprintf(out, "edge %d -> %d : %s\n", edge.From().ID(), edge.From().ID(), edgeKind)
654
-		}
655
-	}
656
-}