Golang加速Gomodule加速Goproxy Goproxy China
The most trusted Go module proxy in China.
Go 1.13 and above (RECOMMENDED)
Open your terminal and execute
$ go env -w GO111MODULE=on
$ go env -w GOPROXY=goproxy,direct
done.伪饰
macOS or Linux
Open your terminal and execute
$ export GO111MODULE=on
$ export GOPROXY=goproxy
or
成都科技馆$ echo "export GO111MODULE=on" >> ~/.profile
$ echo "export GOPROXY=goproxy" >> ~/.profile
$ source ~/.profile
done.
Windows
Open your terminal and execute
C:\> $env:GO111MODULE = "on"
C:\> $env:GOPROXY = "goproxy"
or
1. Open the Start Search, type in "env"塔菜怎么做好吃
2. Choo the "Edit the system environment variables"
3. Click the "Environment Variables…" button
4. Under the "Ur variables for <YOUR_USERNAME>" ction (the upper half)
5. Click the "" button
6. Choo the "Variable name" input bar, type in "GO111MODULE"
7. Choo the "Variable value" input bar, type in "on"
8. Click the "OK" button
9. Click the "" button
石榴的诗句10. Choo the "Variable name" input bar, type in "GOPROXY"
哥伦比亚人
11. Choo the "Variable value" input bar, type in "goproxy"
12. Click the "OK" button
done.
goproxy.io
A Global Proxy for Go Modules
Go version >= 1.13 (RECOMMENDED)
苻登go env -w GO111MODULE=on
go env -w GOPROXY="goproxy.io,direct"
# Set environment variable allow bypassing the proxy for lected modules (optional)
go env -w GOPRIVATE="*."
# Set environment variable allow bypassing the proxy for specified organizations (optional)
go env -w GOPRIVATE="/org_name"
xingkongNow, when you build your applications, Go will fetch dependencies via goproxy.io. See more information in the and .
Go version <= 1.12
Bash (Linux or macOS)
# Enable the go modules feature
export GO111MODULE="on"
# Set the GOPROXY environment variable
export GOPROXY="goproxy.io"
Or, write it into the .profile or .bash_profile file.
PowerShell (Windows)
# Enable the go modules feature
$env:GO111MODULE="on"
尬舞# Set the GOPROXY environment variable
$env:GOPROXY="goproxy.io"
Now, when you build your applications, Go will fetch dependencies via goproxy.io. See more information in the .