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
Archives
Today
Total
05-15 13:20
관리 메뉴

nomad-programmer

[Programming/Go] OSX에서 Go 설정 본문

Programming/Go

[Programming/Go] OSX에서 Go 설정

scii 2019. 12. 12. 15:32
// home brew로 go 설치
brew install go

// .bashrc나 .zshrc에 환경변수 설정
export GOPATH="${HOME}/.go"
export GOROOT="$(brew --prefix golang)/libexec"
export PATH="$PATH:${GOPATH}/bin:${GOROOT}/bin"

// godoc 설치
go get golang.org/x/tools/cmd/godoc

// golint 설치
go get github.com/golang/lint/golint

 

만약 VSCode를 쓴다면 아래의 Go Extension 설치

https://marketplace.visualstudio.com/items?itemName=ms-vscode.Go

 

Go - Visual Studio Marketplace

Go for Visual Studio Code This extension adds rich language support for the Go language to VS Code. Read the Changelog to know what has changed over the last few versions of this extension. Table of Contents Language Features IntelliSense Auto Completion o

marketplace.visualstudio.com

 

만약 Vim에다 위에서 설치한 golint를 적용하고자 한다면 아래 링크 참조

https://github.com/golang/lint

 

golang/lint

[mirror] This is a linter for Go source code. Contribute to golang/lint development by creating an account on GitHub.

github.com

 

Comments