goland version 2019.3.2
go version 1.14
What a mess, a mess of a lot of online articles, talk for a long time did not clarify how the practical application of the go module, Zhendi irritability, a mile giao I giaogiao! ! ! ! !
Here I introduce direct goland go module guide how to use a good package, it does not describe other features
1. Open the setting
There are many mirrors, surf the Internet
2.go init mod or goland the lower right corner with a guide package tips
Open cmd, switch the location of the files to the directory where your project files, such as the project is called RabbitMQ_Iris, run shell commands go mod init project name
After go.mod will be generated in the project file inside
3. Click Run the program, goland will automatically help you download the package guide
At first these packages are red, then finished on the lead pack turned green, while generating go.sum file in the project folder inside
Stored in the package guide gopath / pck / mod path, the inside environment variables GOPATH
Summary, run shell commands go mod init file name, and then use goland run the program, on the European