Golang加速Gomodule加速Goproxy

更新时间:2023-07-12 09:46:13 阅读: 评论:0

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 .

本文发布于:2023-07-12 09:46:13,感谢您对本站的认可!

本文链接:https://www.wtabcd.cn/fanwen/fan/82/1092361.html

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。

标签:科技馆   诗句   成都   石榴
相关文章
留言与评论(共有 0 条评论)
   
验证码:
推荐文章
排行榜
Copyright ©2019-2022 Comsenz Inc.Powered by © 专利检索| 网站地图