Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

찌로그

Start golang! (Install with brew in MacOS) 본문

Golang

Start golang! (Install with brew in MacOS)

찌드 2020. 10. 7. 14:14

Install go

brew install golang

Setup Workspace

It’s considered best practice to use $HOME/go location for your workspace, so let’s do that!

mkdir -p $HOME/go/{bin,src,pkg}

We created two important folders bin and src that’ll be used for GO

Setup Environment

나는 zsh 쓰고 있기때문에, ~/.zshrc 에 다음내용을 추가

export GOPATH=$HOME/go
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"

그리고 적용

Result 

Comments