gvm

Since go1.5 go uses golang to compile go, which means you need go to compile go 😃 You need to have installed a go version go1.4.3

Error:

cat ~/.gvm/logs/go-go1.4-compile.log
# Building C bootstrap tool.
cmd/dist

# Building compilers and Go bootstrap tool for host, darwin/amd64.
lib9
libbio
liblink
cmd/cc
cmd/gc
cmd/6l
cmd/6a
cmd/6c
/Users/goliatone/.gvm/gos/go1.4/src/cmd/6c/txt.c:995:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
/Users/goliatone/.gvm/gos/go1.4/src/cmd/6c/txt.c:1045:28: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
go tool dist: FAILED: clang -Wall -Wstrict-prototypes -Wextra -Wunused -Wno-sign-compare -Wno-missing-braces -Wno-parentheses -Wno-unknown-pragmas -Wno-switch -Wno-comment -Wno-missing-field-initializers -Werror -fno-common -ggdb -pipe -Wuninitialized -O2 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -mmacosx-version-min=10.6 -c -m64 -I /Users/goliatone/.gvm/gos/go1.4/include -I /Users/goliatone/.gvm/gos/go1.4/src/cmd/6c -o /Users/goliatone/.gvm/gos/go1.4/pkg/obj/cmd/6c/txt.o /Users/goliatone/.gvm/gos/go1.4/src/cmd/6c/txt.c

Error:

at ~/.gvm/logs/go-go1.6.3-compile.log
##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /Users/goliatone/go1.4/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.

You can run the command as follows:

GOROOT_BOOTSTRAP=/Users/goliatone/.gvm/gos/go1.4.3 gvm install go1.6.3

Export to your bash profile:

export GOROOT_BOOTSTRAP=/Users/goliatone/.gvm/gos/go1.4.3/

[[ -s "$HOME/.gvm/scripts/gvm" ]] && source "$HOME/.gvm/scripts/gvm"

Tools

go get -u golang.org/x/tools/cmd/goimports go get -u golang.org/x/tools/cmd/goimports go get -u github.com/alecthomas/gometalinter