当前位置:网站首页>Go language development environment setup +goland configuration under the latest Windows
Go language development environment setup +goland configuration under the latest Windows
2022-06-24 09:57:00 【BigChen_ up】
One 、 download Go Language development package
You can Go Language website (https://golang.google.cn/dl/) download Windows Under the system Go Language development package , As shown in the figure below .
Here we download 64 Bit development package , If the computer is 32 Bit system , You need to download 32 Bit development package , Scroll down in the page shown above to find 32 Download address of bit development package , As shown in the figure below .
Be careful : download Windows Version of Go When developing language packages, try to choose MSI Format , Because it can be installed directly into the system , No additional operations are required .
Two 、 install Go Language development package
Double click to download OK Go Language development kit can start the installer , As shown in the figure below , This is a Go User license agreement for language , Don't worry about it , Check... Directly “I accept …” And then click “Next” that will do .

stay Windows Under the system Go The language development package will be installed to by default C Discoid Go Under the table of contents , It is recommended to install in this directory , It is convenient to use . Of course , You can also choose another installation directory , Click after confirmation “Next”, As shown in the figure below :
Go There are no other options to be set for the installation of language development package , Click on “Install” You can start the installation , As shown in the figure below :
Wait for the program to complete installation , And then click “Finish” Quit Setup .

After installation , Some directories and files will be generated under the installation directory we set , As shown in the figure below :
3、 ... and 、 Set the environment variable
After the development package is installed , We also need to configure GOPATH environment variable , Can be used later Go Language development .GOPATH It's a path , It is used to store the code package needed in development .
Right click on the desktop or explorer “ This computer ”( perhaps “ My computer ”)→“ attribute ”→“ Advanced system setup ”→“ environment variable ”, As shown in the figure below .
Find... In the pop-up menu GOPATH The corresponding options can be modified by clicking Edit , If not, you can choose to create a new one , And fill in the variable name as GOPATH, The variable value can be set to any directory ( Try to choose an empty directory ), for example D:\Go.

Four 、 Development tools set environment variables intelligently
This tutorial uses GoLand development tool ,Goland Download below :
Goland Download and install
You can go from Goland Download the corresponding version of Goland Installation package
Official website download address :https://www.jetbrains.com/go/download/other.html
- To configure GOROOT open GoLand Development tools Click :File/Settings/GOROOT Pictured :

- To configure GOPATH. open GoLand Development tools Click :File/Settings/GOPATH Pictured :

After the configuration is completed, you can run the code , stay D:\goProject Create a new folder test.go The documents are as follows :
package main
import "fmt"
func main() {
fmt.Println("hello world")
}

边栏推荐
- 买的长期理财产品,可以转短吗?
- Turn to: CEO of Samsung Electronics: all decisions should start from recognizing yourself
- Symbol. Iterator iterator
- 415-二叉树(144. 二叉树的前序遍历、145. 二叉树的后序遍历、94. 二叉树的中序遍历)
- Amendment to VPP implementation policy routing
- Oracle database listening file configuration
- js代理模式
- Producer / consumer model
- 物联网?快来看 Arduino 上云啦
- 请问有国内靠谱低手续费的期货开户渠道吗?网上开户安全吗?
猜你喜欢
随机推荐
5分钟,客服聊天处理技巧,炉火纯青
415-二叉树(144. 二叉树的前序遍历、145. 二叉树的后序遍历、94. 二叉树的中序遍历)
[custom endpoint and implementation principle]
ggplot2颜色设置总结
linux下oracle服务器打开允许远程连接
latex公式及表格识别
414-二叉树的递归遍历
How does home office manage the data center network infrastructure?
使用Live Chat促進業務銷售的驚人技巧
Literature Research Report
Threejs point light + ambient light
Detailed explanation of PHP singleton mode
十大证券公司哪个佣金最低,最安全可靠?有知道的吗
Indexeddb local storage, homepage optimization
Nvisual digital infrastructure operation management software platform
JS singleton mode
顶刊TPAMI 2022!基于不同数据模态的行为识别:最新综述
Operator details
Prct-1400: failed to execute getcrshome resolution
Mise en œuvre du rendu de liste et du rendu conditionnel pour l'apprentissage des applets Wechat.









