In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-12 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)05/31 Report--
This article introduces the relevant knowledge of "How to configure Go language environment under Mac Vs code". In the actual case operation process, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
I. Go Download and Install
Mac version select pkg, download can be installed directly.
II. Verification Version
Command line:
go version
Display the installed version and you are officially done
III. Vs code configuration Go environment
1. Go Development Extension
Search Go directly in Vs code extension and install it.
2. Go tool in VS code
Vs code Open input: Command+Shift+P, in the pop-up box input: Go:install/update Tools, select all tools, install. The output window displays the following: (Personal 10 tools are not installed successfully)
Tools environment: GOPATH=/Users/luck/go
Installing 10 tools at /Users/luck/go/bin in module mode.
gopkgs
go-outline
gotests
gomodifytags
impl
goplay
dlv
dlv-dap
staticcheck
gopls
Appears: Installing github.com/josharian/impl FAILED etc.
Workaround-Set proxy:
Go 1.13 and above (recommended)
Open your terminal and execute
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=https://goproxy.cn,direct
Done.
macOS or Linux
Open your terminal and execute
$ export GO111MODULE=on
$ export GOPROXY=https://goproxy.cn
or
$ echo "export GO111MODULE=on" >> ~/.profile
$ echo "export GOPROXY=https://goproxy.cn" >> ~/.profile
$ source ~/.profile
"Mac Vs code how to configure the Go language environment" content is introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un