This commit is contained in:
Unknwon
2015-03-03 12:15:28 -05:00
parent 677a08c61d
commit b8c82ba4e5
5 changed files with 82 additions and 65 deletions

View File

@@ -1,4 +1,6 @@
# 9.6 为你的自定义包使用godoc
# 9.6 为自定义包使用 godoc
208
godoc工具(3.6章节)在显示自定义包中的注释也有很好的效果:注释必须以//开始并无空行放在声明(包,类型,函数)前。godoc会为每个文件生成一系列的网页。
例如:
@@ -6,7 +8,7 @@ godoc工具(3.6章节)在显示自定义包中的注释也有很好的效果:
-在do_examples目录下我们有11.7章节中的用来排序的go文件文件中有一些注释文件需要未编译
-命令行下进入目录下并输入命令:
godoc -http =:6060 -paht="."
(.是指当前目录,-path参数可以是/path/to/my/package1这样的形式指出package1在你源码中的位置或接受用冒号形式分隔的路径无根目录的路径为相对于当前目录的相对路径)
@@ -22,13 +24,13 @@ doc_example | Packages | Commands | Specification
sort包
func Float64sAreSorted
func Float64sAreSorted
type IntArray
func IntsAreSortedfunc IsSortedfunc Sort
type IntArray
func IntsAreSortedfunc IsSortedfunc Sort
func (IntArray) Len
func SortFloat64s