

Applications/Visual Studio Code.app/Contents/Resources/app/bin/code (binary) Download and install on the official website: vscode official website.GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/4t/rrdtjpp9487_6gf8mclrslpm0000gn/T/go-build714070253=/tmp/go-build -gno-record-gcc-switches -fno-common" 3. GOTOOLDIR="/usr/local/Cellar/go/1.12.7/libexec/pkg/tool/darwin_amd64" GOPATH="/Users/xxxx/Documents/work/go_work" GOCACHE="/Users/xxxx/Library/Caches/go-build" Bash? Profile to take effect.Ĭheck go env to see if the environment variable is set successfully $ go env Mac The environment variable of environment is set at vim ~/.bash_profile,Add at the end of the file export GOROOT="/usr/local/Cellar/go/1.12.7/libexec"Įxport PATH="$/bin"Īfter setting, execute source ~ /. GOPATH: Workspace directory (The directory cannot be associated with Go There are three subdirectories under this directory: src,bin,pkg) Configure the Golang environment variable Open source programming language to build simple/reliable/efficient software # Check whether the installation is successful


This article introduces how to use visual studio code to build golang development environment and debug environment on Mac platform.
