From 10c4a8acb2970470387fceb6067aa6a9ac2e6131 Mon Sep 17 00:00:00 2001 From: "rick.chan" Date: Fri, 29 Jan 2021 17:11:56 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=91=BD=E4=BB=A4.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: rick.chan --- Software/Development/Language/Go/Basic/Golang_安装_Packages.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Software/Development/Language/Go/Basic/Golang_安装_Packages.md b/Software/Development/Language/Go/Basic/Golang_安装_Packages.md index baa859b..7b7bc53 100644 --- a/Software/Development/Language/Go/Basic/Golang_安装_Packages.md +++ b/Software/Development/Language/Go/Basic/Golang_安装_Packages.md @@ -7,6 +7,7 @@ go 默认使用的是 proxy.golang.org,在国内无法访问。 换一个国内能访问的代理地址:,命令如下: ```bash +go env -w GO111MODULE=on go env -w GOPROXY=https://goproxy.cn ``` @@ -15,7 +16,7 @@ go env -w GOPROXY=https://goproxy.cn 以安装 guru 为例: ```bash -go get golang.org/x/tools/cmd/guru +go get golang.org/x/tools/cmd/guru go build golang.org/x/tools/cmd/guru mv guru $(go env GOROOT)/bin ```