`

Golang 1.0 文档使用。godoc ,go 命令 学习 ,本地运行 gotour

 
阅读更多

首先要安装环境 参考:

 

http://toeo.iteye.com/blog/1470598

 

找了半天 没有 看明白 doc 的目录结构。

 

原来 doc 是web 展示的 !!!

 

本地 运行 web 版本 doc文档

 

输入 

 

 

> godoc -http=:6060

 

 

 然后在浏览器里面就可以看到了:

 


 

访问你的浏览器年 就有自己的一个 本地 文档中心了。


 

google go 毫不吝啬。golang.org 上面的文档相关东西都 本地化了。直接在web里面运行go程序的没有 本地化。必需通过web访问。(http://play.golang.org/p/3VsQMI4Rx5 )这个地址可以直接编辑,直接运行。

 


这个最重要 了。是 GO 语言的 可以使用的 api 函数 的全部页面。

 

http://localhost:6060/pkg/

 


 

 

 

 

网络安装,运行gotour

 

看到 这个 才在知道 go 有一个 类似 debian的 apt-get 的安装文件的方式。

 

http://tour.golang.org/#2

 

超赞!!!!!!

 

 

go get code.google.com/p/go-tour/gotour

 

默认 好像是带https的。如果连接不上可以试试:

 

go get http://code.google.com/p/go-tour/gotour 
 

 

虽然是get 命令其实 需要 hg :

 


 

安装 hg 

 

http://mercurial.selenic.com/

 

 

然后在运行 命令。没有报错。说明已经下载了。

 


运行 :

 

 

gotour
 


发现又 起了 一个 http 端口。go的一个服务 就启动了。

 

 

太令人惊奇了!!!!

 


我本地就可以跑 gotour 应用了。看了要自己搭建一个 golang的私服是非常的容易啊。

 

继续 学习 go, 有兴趣的大家 一起学习。

  • 大小: 13.3 KB
  • 大小: 169.1 KB
  • 大小: 132.9 KB
  • 大小: 215 KB
  • 大小: 31.7 KB
  • 大小: 23.4 KB
  • 大小: 29.8 KB
  • 大小: 49.6 KB
0
0
分享到:
评论
3 楼 itfanr 2014-03-23  
楼主写的真好  本地godoc
2 楼 toeo 2012-05-10  
如果使用 go 1.0.1 就

>go get code.google.com/p/go-tour/gotour

我这里是可以的。祝你好运。
或者配置一个host 试试:

203.208.46.30 code.google.com
1 楼 techabc 2012-05-10  
GFW! 该咋整呢?

D:\Go>go get code.google.com/p/go-tour/gotour
package code.google.com/p/go-tour/gotour: Get https://code.google.com/p/go-tour/
source/checkout?repo=: dial tcp 74.125.71.113:443: A connection attempt failed b
ecause the connected party did not properly respond after a period of time, or e
stablished connection failed because connected host has failed to respond.

D:\Go>go get http://code.google.com/p/go-tour/gotour
package http:/code.google.com/p/go-tour/gotour: unrecognized import path "http:/
code.google.com/p/go-tour/gotour"

D:\Go>

相关推荐

Global site tag (gtag.js) - Google Analytics