티스토리 뷰

Visual Studio Code (vscode) 에 go lang 개발 환경 세팅

1. vscode 다운로드

2. go 다운로드

3. vscode에 go 플러그인 설치

4. 환경 변수

 

1. vscode 다운로드

https://code.visualstudio.com/

 

Visual Studio Code - Code Editing. Redefined

Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications.  Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows.

code.visualstudio.com

https://code.visualstudio.com/download

 

Download Visual Studio Code - Mac, Linux, Windows

Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern web and cloud applications.

code.visualstudio.com

- 메인페이지에서 바로 다운로드

windows 10 , 64 bit, 설치버전

- 다운로드 페이지에서 원하는 버전 다운로드

windows 10 , 64 bit, 설치버전

 

2. go 다운로드 (1.12.5 버전)

https://golang.org/dl/ (최신버전)

 

Downloads - The Go Programming Language

Downloads After downloading a binary release suitable for your system, please follow the installation instructions. If you are building from source, follow the source installation instructions. See the release history for more information about Go releases

golang.org

Archived versions 클릭하여 1.12.5 버전으로 설치

windows 10 , 64 bit (설치버전으로 다운)

 

3. vscode에 go 플러그인 설치

마켓플레이스에서 'go' 검색 후, 아래 플러그인 설치 버튼으로 추가

 

4. 환경 변수

 

 

 

 

 

PS C:\vscode\workspace\testapi> go env
set GOARCH=amd64
set GOBIN=
set GOCACHE=C:\Users\admin\AppData\Local\go-build
set GOEXE=.exe
set GOFLAGS=
set GOPROXY=
set GORACE=
set GOROOT=C:\Go
set GOTMPDIR=
set GOTOOLDIR=C:\Go\pkg\tool\windows_amd64
set GCCGO=gccgo
set CC=gcc
set CXX=g++
set CGO_ENABLED=1
set GOMOD=C:\vscode\workspace\testapi\go.mod
set CGO_CFLAGS=-g -O2
set CGO_CPPFLAGS=
set CGO_CXXFLAGS=-g -O2
set CGO_FFLAGS=-g -O2
set CGO_LDFLAGS=-g -O2
set PKG_CONFIG=pkg-config
set GOGCCFLAGS=-m64 -mthreads -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=C:\Users\admin\AppData\Local\Temp\go-build062055602=/tmp/go-build -gno-record-gcc-switches

 

PS C:\vscode\workspace> go version
go version go1.12.5 windows/amd64
댓글