先設置好環境變量,實際上已經在考慮導包的話,應該早就設置好這些了,使用go get官方的包是不行的,因為官網被牆了,而如果直接go get github的包或直接clone,下載后放到src目錄的話,是不會下載依賴包的,因此需要自己下載依賴包,或者設置代理,之后進入下載目錄,go build之后
go install,再重啟goland,之后在go init一下
參考:
https://blog.csdn.net/qq_22211217/article/details/101854419
https://github.com/goproxy/goproxy.cn
https://blog.csdn.net/sinat_28545681/article/details/52535720
https://www.cnblogs.com/landv/p/10948227.html