1
0
mirror of https://github.com/golang/go synced 2024-11-18 05:44:47 -07:00

cmd/eg: Gofmt eg's dry-run output.

The content of the dry-run and the actual (file-editing) run should now
be the same.

Change-Id: If89f85838f7f53f14ffa4e2b6a425507835dda62
Reviewed-on: https://go-review.googlesource.com/48210
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Leo Rudberg 2017-07-12 19:47:01 -04:00 committed by Brad Fitzpatrick
parent 76622760f0
commit 7a94893dc3

View File

@ -7,8 +7,8 @@ import (
"flag"
"fmt"
"go/build"
"go/format"
"go/parser"
"go/printer"
"go/token"
"os"
"os/exec"
@ -139,7 +139,7 @@ func doMain() error {
hadErrors = true
}
} else {
printer.Fprint(os.Stdout, iprog.Fset, file)
format.Node(os.Stdout, iprog.Fset, file)
}
}
}