当前位置:网站首页>学习 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
边栏推荐
- 【leetcode】199.二叉树的右视图
- MySQL common statements
- 精彩回顾|「源」来如此 第六期 - 开源经济与产业投资
- Excel · VBA array bubble sorting function
- Derivation and regularization
- JDBC – PreparedStatement – 如何设置 Null 值?
- Mba-day6 logic - hypothetical reasoning exercises
- Visualization Road (10) detailed explanation of segmentation canvas function
- Wonderful review | deepnova x iceberg meetup online "building a real-time data Lake based on iceberg"
- Introduction to data analysis 𞓜 kaggle Titanic mission (III) - > explore data analysis
猜你喜欢

Download and installation steps of xshell + xftp

Microsoft Access database using PHP PDO ODBC sample

一道有趣的阿里面试题

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

MySQL how to merge the same data in the same table

Wonderful review | deepnova x iceberg meetup online "building a real-time data Lake based on iceberg"

【leetcode】107. Sequence traversal of binary tree II

Detailed explanation of typora Grammar (I)

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

使用 PHP PDO ODBC 示例的 Microsoft Access 数据库
随机推荐
web三大组件(Servlet,Filter,Listener)
Notes on concurrent programming of vegetables (IX) asynchronous IO to realize concurrent crawler acceleration
Notes on concurrent programming of vegetables (V) thread safety and lock solution
A diary of dishes | 238 Product of arrays other than itself
Common parameters of ffmpeg command line
Xdotool key Wizard
Embedded related surface (I)
GO接口使用
Visual solutions to common problems (VIII) mathematical formulas
Solutions to common problems in visualization (VIII) solutions to problems in shared drawing area
MySQL common statements
Mba-day6 logic - hypothetical reasoning exercises
RESTful和SOAP的区别
HuggingFace
After the MySQL router is reinstalled, it reconnects to the cluster for boot - a problem that has been configured in this host before
PlatoFarm推出正式版游戏经济模型的特点分析
Dirichlet prefix sum (number theory optimization formula sub complexity weapon)
How to quickly download vscode
Visualization Road (10) detailed explanation of segmentation canvas function
【leetcode】102.二叉树的层序遍历