内容简介:在Go开发中,经常有大量项目依赖golang.org/x包,但这个源码包被储放在万恶的国外资本势力的服务器上,国内开发人员想要使用需要一翻动作。golang团队将他们的代码镜像在Github上,因此,我们可以将golang.org/x使用到的包,统统下载在我们开发环境的首先,在 $GOPATH 目录中创建 golang.org/x 目录:
在 Go 开发中,经常有大量项目依赖golang.org/x包,但这个源码包被储放在万恶的国外资本势力的服务器上,国内开发人员想要使用需要一翻动作。
golang团队将他们的代码镜像在Github上,因此,我们可以将golang.org/x使用到的包,统统下载在我们开发环境的 $GOPATH/src/golang.org/x
目录,编译项目时就可以直接使用本地依赖。
首先,在 $GOPATH 目录中创建 golang.org/x 目录:
$ mkdir -p $GOPATH/src/golang.org/x
然后把 x
的几个包clone下来:
$ cd $GOPATH/src/golang.org/x # Clone 常用和几个库: $ git clone --depth=1 https://github.com/golang/tools.git $ git clone --depth=1 https://github.com/golang/sys.git $ git clone --depth=1 https://github.com/golang/crypto.git $ git clone --depth=1 https://github.com/golang/text.git $ git clone --depth=1 https://github.com/golang/net.git
其它库以相同方式处理。
以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网
猜你喜欢:- Hadoop小文件解决方案-基于文件整合的解决方案
- Hadoop小文件解决方案-基于NameNode内存和MapReduce性能解决方案
- 跨域解决方案
- 异步解决方案---promise
- 前端一键打印解决方案
- MySQL 压缩解决方案(一)
本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们。
Beginning ASP.NET 4 in C# and Vb
Imar Spaanjaars / Wrox / 2010-3-19 / GBP 29.99
This book is for anyone who wants to learn how to build rich and interactive web sites that run on the Microsoft platform. With the knowledge you gain from this book, you create a great foundation to ......一起来看看 《Beginning ASP.NET 4 in C# and Vb》 这本书的介绍吧!