In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "how to use Go module proxy library". In the operation process of actual cases, many people will encounter such difficulties. Next, let Xiaobian lead you to learn how to deal with these situations! I hope you can read carefully and learn something!
Usage Go 1.13 and above (recommended)
Open your terminal and execute
$ go env -w GO111MODULE=on$ go env -w GOPROXY=https://goproxy.cn,direct
Done.
macOS or Linux
Open your terminal and execute
$ export GO111MODULE=on$ export GOPROXY=https://goproxy.cn
or
$ echo "export GO111MODULE=on" >> ~/.profile$ echo "export GOPROXY=https://goproxy.cn" >> ~/.profile$ source ~/.profile
Done.
Windows
Open your PowerShell and execute
C:\> $env:GO111MODULE = "on"C:\> $env:GOPROXY = "https://goproxy.cn"
or
1. Open Start and search for env 2. Select Edit System Environment Variables 3. Click on the "Environment Variables..." button 4. Under the section "User variables of"(upper part) 5. Click the "New..." button 6. Select the "Variable Name" input box and enter "GO111MODULE"7. Select the "Variable Value" input box and enter "on"8. Click the OK button 9. Click the "New..." button 10. Select the "Variable Name" input box and enter "GOPROXY"11. Select the "Variable Value" input box and enter "https://goproxy.cn"12. Click the OK button
Done.
FAQ Why create Goproxy China?
Due to the Chinese government's online regulatory system, Go ecosystem has many modules that Chinese Gopher cannot access, such as the most famous golang.org/x/... And getting modules from GitHub in the mainland of China is also a bit slow. Therefore, we created Goproxy China to enable Gopher in China to better use Go modules. In fact, because goproxy.cn is accelerated via CDN, it is also available to Gopher users in other countries.
Is it safe to use Goproxy in China?
Of course, like all other Go module proxies, we just cache modules intact, so we can assure you that they will never be tampered with on our side. However, if you still can't trust us completely, you can use the most trusted checksum database sum.golang.org to ensure that the modules you get from us have not been tampered with, because Goproxy already supports proxy checksum databases.
Is Goproxy legal in China?
Goproxy China is a commercially supported project rather than a personal project. And it has been ICP filed in the Ministry of Industry and Information Technology of the People's Republic of China (ICP filing number: Shanghai ICP No. 11037377-56), which means that it is completely legal in China.
Why not use proxy.golang.org?
Because proxy.golang.org is blocked in the mainland of China, it is not used. However, if you are not in the mainland of China, then we recommend that you give priority to using proxy.golang.org, after all, it looks more official. Once you enter the mainland of China, we want you to think of goproxy. cn first, which is the main reason why we chose.cn as the domain suffix.
"How to use Go module proxy library" content introduced here, thank you for reading. If you want to know more about industry-related knowledge, you can pay attention to the website. Xiaobian will output more high-quality practical articles for everyone!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.