go/go.sh

19 lines
331 B
Bash

# go toolchain env paths
libdir=lib
arch=386
if [ -x /usr/lib64/go ] ; then
libdir=lib64
arch=amd64
fi
export GOOS="linux"
export GOARCH=$arch
export GOROOT=/usr/$libdir/go
export GOBIN=/usr/bin
export GOPATH=$GOROOT/contrib
if [ `id -u` != 0 ]; then
export GOPATH=$HOME/go:$GOROOT/contrib
export GOBIN=$HOME/go/bin
fi