diff --git a/.profile b/.profile index 9ca9d34d..e5d0a959 100644 --- a/.profile +++ b/.profile @@ -112,9 +112,10 @@ fi export WINEDLLOVERRIDES="mscoree,mshtml=" ## Go -if [ -d "$HOME/.go" ]; then - export GOPATH=~/.go - appendpath "$GOPATH/bin" +if [ -d "$HOME/go" ]; then + export GOPATH=~/go:~/.go-tools + appendpath "$HOME/.go-tools/bin" + appendpath "$HOME/go/bin" command -v godoc >/dev/null 2>&1 && godoc -http :6060 -play & fi diff --git a/.scripts/homeinit b/.scripts/homeinit index 34e89954..babaf2b6 100755 --- a/.scripts/homeinit +++ b/.scripts/homeinit @@ -52,10 +52,10 @@ echo "==> Hackpool" ln -snfv "$SOURCEDIR/hackpool" "$HOME/.hackpool" echo "==> Go path" -mkdir -pv "$HOME/.go" +mkdir -pv "$HOME/go" "$HOME/.go-tools" if command -v go >/dev/null 2>&1; then echo "==> Go extra dev tools" - export GOPATH=~/.go + export GOPATH="$HOME/.go-tools" export PATH="$PATH:$GOPATH/bin" ## See https://dominik.honnef.co/posts/2014/12/an_incomplete_list_of_go_tools/. ## https://dominik.honnef.co/go/ @@ -64,8 +64,9 @@ if command -v go >/dev/null 2>&1; then github.com/nsf/gocode \ github.com/rogpeppe/godef \ honnef.co/go/unused/cmd/unused + go get -v github.com/monochromegane/the_platinum_searcher/... go get -v github.com/alecthomas/gometalinter && gometalinter -i - strip -s "$HOME/.go/bin"/* + strip -s "$GOPATH/bin"/* fi if command -v emacs >/dev/null 2>&1; then