]> Cypherpunks repositories - gostls13.git/commit
cmd/go: run gofmt from current GOROOT
authorAlexander Zolotov <goldifit@gmail.com>
Sat, 9 May 2015 13:41:32 +0000 (16:41 +0300)
committerRob Pike <r@golang.org>
Tue, 19 May 2015 20:54:34 +0000 (20:54 +0000)
commitb3241912ff62ab64ec3c61bc8c198b6e12890a77
tree5b5d2cc3ec17909b57c48e09166660f12a37225a
parent8b83306cf20abed54d7cb23a3f3091b7e6202056
cmd/go: run gofmt from current GOROOT

The existing implementation executes `gofmt` binary from PATH
environment variable on invocation `go fmt` command.
Relying on PATH might lead to confusions for users with several Go installations.
It's more appropriate to run `gofmt` from GOBIN (if defined) or GOROOT.

Fixes #10755

Change-Id: I56d42a747319c766f2911508fab3994c3a366d12
Reviewed-on: https://go-review.googlesource.com/9900
Reviewed-by: Rob Pike <r@golang.org>
src/cmd/go/fmt.go