1
0
mirror of https://github.com/golang/go synced 2024-11-05 19:46:11 -07:00
go/cmd/digraph
Jean de Klerk b3340bdf36 cmd/digraph: omit unnecessary empty lines in focus
There's currently a bug which will print additional lines, since append adds to
the end of an array instead of starting from the first open position. That cause
strings.Join to print empty lines for each of the pre-allocated array elements.
So, this CL changes the make to set capacity instead of len, and sets len to 0.

Change-Id: Iaf6d07ca2648d0bbcafcd21a5b485cccd7f0c68c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/208137
Run-TryBot: Jean de Klerk <deklerk@google.com>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
2019-11-20 15:59:38 +00:00
..
digraph_test.go cmd/digraph: add focus 2019-11-20 14:37:58 +00:00
digraph.go cmd/digraph: omit unnecessary empty lines in focus 2019-11-20 15:59:38 +00:00