当前位置:网站首页>学习 Go 语言 0x01:从官网开始
学习 Go 语言 0x01:从官网开始
2022-04-23 11:02:00 【爱博客大伯】
* Go 语言的官网
这个网址被墙了,因为golang.org只是别名(CNAME),其真实的域名是 golang-consa.l.google.com。ping 这个域名,可以知道:
ping golang.org
正在 Ping golang-consa.l.google.com [216.239.37.1]
google.com在中国还不能访问,所以golang.org也访问不了。
* 为 Go 配置代理
可以为 go get命令设置代理:
在Windows中
set http_proxy=http://127.0.0.1:46205
set https_proxy=http://127.0.0.1:46205
在linux中,在.bashrc或.profile中设置http_proxy, https_proxy的值。
go get 背后执行的是git clone,所以如果上述代理设置不起作用,可以为git设置代理,如下:
git config --global --add http.proxy http://127.0.0.1:46205
需要注意的是,这个代理是全局的,即你的机器上的git 工程都将走这个代理。
所以,如果不用代理了,要及时删掉,可以执行git config --global -e,然后 删掉代理即可。
在 Linux中,还可以这样执行 go get,即在 go get之前加上http_proxy=127.0.0.1:6701
http_proxy=127.0.0.1:6701 go get golang.org/dl/go1.10.7
* 可以在中国访问的Go官网
go 官网 : https://golang.google.cn
go 语言之旅: https://tour.go-zh.org/welcome/1
* 查看 Go 的环境变量
执行 $ go env可以查看你当前环境中Go相关的环境变量。
* 在Cygwin中使用 Go
在Cygwin中,编译、执行都还正常。
但是,go get命令会有问题,会出现路径错误,可能 go get本身没有考虑到在cygwin中执行。
版权声明
本文为[爱博客大伯]所创,转载请带上原文链接,感谢
https://blog.csdn.net/u013553529/article/details/88833101
边栏推荐
- MBA - day5 mathématiques - Questions d'application - Questions d'ingénierie
- 语雀文档编辑器将开源:始于但不止于Markdown
- SWAT - Introduction to Samba web management tool
- MBA-day5数学-应用题-工程问题
- ffmpeg命令行常用参数
- Gets the current time in character format
- Notes on concurrent programming of vegetables (IX) asynchronous IO to realize concurrent crawler acceleration
- How to quickly download vscode
- Let the LAN group use the remote device
- MBA-day5数学-应用题-工程问题
猜你喜欢

【leetcode】107. Sequence traversal of binary tree II

MySQL Router重装后重新连接集群进行引导出现的——此主机中之前已配置过的问题

Mysql8. 0 installation guide

Learning Notes 6 - Summary of several deep learning convolutional neural networks

Solutions to common problems in visualization (VIII) solutions to problems in shared drawing area

Visual solutions to common problems (VIII) mathematical formulas

精彩回顾|「源」来如此 第六期 - 开源经济与产业投资

Cve-2019-0708 vulnerability exploitation of secondary vocational network security 2022 national competition

ID number verification system based on visual structure - Raspberry implementation

Constraintlayout layout
随机推荐
Understand the key points of complement
精彩回顾|「源」来如此 第六期 - 开源经济与产业投资
Installing MySQL with CentOS / Linux
Full stack cross compilation x86 completion process experience sharing
Reading integrity monitoring techniques for vision navigation systems - 5 Results
Qinglong panel pull library command update [April 20, 2022] collection is not lost
软件测试人员,如何优秀的提Bug?
SQL server query database deadlock
Notes on concurrent programming of vegetables (IX) asynchronous IO to realize concurrent crawler acceleration
Learning website materials
CUMCM 2021-B:乙醇偶合制備C4烯烴(2)
Resolution and size of mainstream mobile phones
Intuitive understanding entropy
UEditor之——图片上传组件大小4M的限制
App. In wechat applet JS files, components, APIs
Pycharm
Simple thoughts on the design of a microblog database
Derivation and regularization
一个微博数据库设计带来的简单思考
Visualized common drawing (II) line chart