Go 语言模块安装工具:goinstall

On 2010/05/30, in Go, by admin

文档地址:http://golang.org/cmd/goinstall/ Go模块列表:http://godashboard.appspot.com/package

goinstall 主要是方便安装第三方模块,目前支持 hg(mercurial),git,svn三种版本控制系统。

下面来举例怎么安装 web.go 模块。源地址是:http://github.com/hoisie/web.go

smallfish@debian:~$ goinstall -dashboard=true github.com/hoisie/web.go

根据网速快慢,过一段时间会结束。期间木有任何提示。(可以加上 -v=true 参数,可以显示安装过程和提示。)

查看下安装的目录和路径:

smallfish@debian:~$ ls $GOROOT/src/pkg/github.com/hoisie/web.go/
examples  _go_.8   Makefile  Readme.md   scgi.go       status.go  web_test.go
fcgi.go   LICENSE  _obj      request.go  servefile.go  web.go

代码示例:

import (web "github.com/hoisie/web.go")

另外注意点,官方文档里 -update 选项现在版本里已经缩写,改成 -u。

Tagged with:  

One Response to Go 语言模块安装工具:goinstall

  1. 这篇文章写的很不错,不过好像还有些地方写的不是太好,还得多加修改呀!

[Blocked by CFC] 义乌妇科 发表评论 取消回复

电子邮件地址不会被公开。 必填项已被标记为 *

*

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

iBlog by PageLines

WP SlimStat