diff --git a/cmd/digraph/digraph.go b/cmd/digraph/digraph.go index 9d42b83c3d..ff2399fea0 100644 --- a/cmd/digraph/digraph.go +++ b/cmd/digraph/digraph.go @@ -526,7 +526,7 @@ func digraph(cmd string, args []string) error { } } - edgesSorted := make([]string, len(edges)) + edgesSorted := make([]string, 0, len(edges)) for e := range edges { edgesSorted = append(edgesSorted, e) }