Last active
September 1, 2018 21:41
-
-
Save ps23/cae68c480ad929227a4864ffc804186b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[[ -r ~/.bashrc ]] && . ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source ~/.profile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export GOPATH=$HOME/.go | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -ex | |
echo "Please enter your golang path (ex: $HOME/.go) :" | |
read gopath | |
mkdir $gopath | |
export GOPATH=$gopath | |
export GOROOT=/usr/local/opt/go/libexec | |
export PATH=$PATH:$GOPATH/bin | |
export PATH=$PATH:$GOROOT/bin | |
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" | |
brew install go | |
brew install git | |
brew install dep | |
go get golang.org/x/tools/cmd/godoc | |
set +ex |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
set -ex | |
PROJECT=<YOUR PROJECT NAME> | |
PROJECT_PATH=${GOPATH}/src/<PATH TO PROJECT W/O PROJECT FOLDER> | |
WORK_PATH=${PWD} | |
mkdir -p ${PROJECT_PATH} | |
if [ ! -e ${PROJECT_PATH}${PROJECT} ]; then ln -s ${WORK_PATH} ${PROJECT_PATH}${PROJECT}; fi | |
cd ${PROJECT_PATH}${PROJECT} | |
go get -d ./... | |
go install | |
dep init || true && dep ensure | |
cd ${WORK_PATH} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment