1
0
mirror of https://github.com/golang/go synced 2024-11-18 09:24:54 -07:00

cmd/gorename: Fixing panic when showing diffs

When displaying a diff the gorename command would panic because the
stdout variable was never set. These changes default stdout to
os.Stdout.

Fixes https://github.com/golang/go/issues/14009

Change-Id: I0902b2b4e2b8e1f46f8ab50e30dcfc841c925174
Reviewed-on: https://go-review.googlesource.com/18813
Reviewed-by: Alan Donovan <adonovan@google.com>
This commit is contained in:
Scott Mansfield 2016-01-18 23:03:27 -08:00 committed by Alan Donovan
parent 7912bef4df
commit abfa4875c0
2 changed files with 2 additions and 2 deletions

View File

@ -157,7 +157,7 @@ var (
Verbose bool
)
var stdout io.Writer
var stdout io.Writer = os.Stdout
type renamer struct {
iprog *loader.Program

View File

@ -157,7 +157,7 @@ var (
Verbose bool
)
var stdout io.Writer
var stdout io.Writer = os.Stdout
type renamer struct {
iprog *loader.Program