github.com/xushiwei/go@v0.0.0-20130601165731-2b9d83f45bc9/lib/godoc/package.txt (about) 1 {{with .PAst}}{{node $ .}}{{end}}{{/* 2 3 --------------------------------------- 4 5 */}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION 6 7 {{comment_text .Doc " " "\t"}} 8 {{else}}PACKAGE DOCUMENTATION 9 10 package {{.Name}} 11 import "{{.ImportPath}}" 12 13 {{comment_text .Doc " " "\t"}} 14 {{example_text $ "" " "}}{{/* 15 16 --------------------------------------- 17 18 */}}{{with .Consts}} 19 CONSTANTS 20 21 {{range .}}{{node $ .Decl}} 22 {{comment_text .Doc " " "\t"}} 23 {{end}}{{end}}{{/* 24 25 --------------------------------------- 26 27 */}}{{with .Vars}} 28 VARIABLES 29 30 {{range .}}{{node $ .Decl}} 31 {{comment_text .Doc " " "\t"}} 32 {{end}}{{end}}{{/* 33 34 --------------------------------------- 35 36 */}}{{with .Funcs}} 37 FUNCTIONS 38 39 {{range .}}{{node $ .Decl}} 40 {{comment_text .Doc " " "\t"}} 41 {{example_text $ .Name " "}}{{end}}{{end}}{{/* 42 43 --------------------------------------- 44 45 */}}{{with .Types}} 46 TYPES 47 48 {{range .}}{{$tname := .Name}}{{node $ .Decl}} 49 {{comment_text .Doc " " "\t"}} 50 {{range .Consts}}{{node $ .Decl}} 51 {{comment_text .Doc " " "\t"}} 52 {{end}}{{range .Vars}}{{node $ .Decl}} 53 {{comment_text .Doc " " "\t"}} 54 {{end}}{{example_text $ .Name " "}} 55 {{range .Funcs}}{{node $ .Decl}} 56 {{comment_text .Doc " " "\t"}} 57 {{example_text $ .Name " "}} 58 {{end}}{{range .Methods}}{{node $ .Decl}} 59 {{comment_text .Doc " " "\t"}} 60 {{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name " "}}{{end}} 61 {{end}}{{end}}{{end}}{{/* 62 63 --------------------------------------- 64 65 */}}{{with $.Notes}} 66 {{range $marker, $content := .}} 67 {{$marker}}S 68 69 {{range $content}}{{comment_text .Body " " "\t"}} 70 {{end}}{{end}}{{end}}{{end}}{{/* 71 72 --------------------------------------- 73 74 */}}{{with .Dirs}} 75 SUBDIRECTORIES 76 {{if $.DirFlat}}{{range .List}}{{if .HasPkg}} 77 {{.Path}}{{end}}{{end}} 78 {{else}}{{range .List}} 79 {{repeat `. ` .Depth}}{{.Name}}{{end}} 80 {{end}}{{end}}