mirror of
https://github.com/golang/go
synced 2024-11-23 10:40:08 -07:00
d6a057c90e
pkg/go/doc: move BUG notes from Package.Bugs to the general Package.Notes field. Removing .Bugs would break existing code so it's left in for now. R=gri, gri, gary.burd, dsymonds, rsc, kevlar CC=golang-dev https://golang.org/cl/7341053
81 lines
1.9 KiB
Plaintext
81 lines
1.9 KiB
Plaintext
{{with .PAst}}{{node . $.FSet}}{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .PDoc}}{{if not $.IsMain}}PACKAGE
|
|
|
|
package {{.Name}}
|
|
import "{{.ImportPath}}"
|
|
|
|
{{else}}COMMAND DOCUMENTATION
|
|
|
|
{{end}}{{comment_text .Doc " " "\t"}}
|
|
{{example_text "" $.Examples $.FSet " "}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .Consts}}
|
|
CONSTANTS
|
|
|
|
{{range .}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}{{end}}
|
|
{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .Vars}}
|
|
VARIABLES
|
|
|
|
{{range .}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}{{end}}
|
|
{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .Funcs}}
|
|
FUNCTIONS
|
|
|
|
{{range .}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{example_text .Name $.Examples $.FSet " "}}
|
|
{{end}}{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .Types}}
|
|
TYPES
|
|
|
|
{{range .}}{{$tname := .Name}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{range .Consts}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{end}}{{range .Vars}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{end}}{{example_text .Name $.Examples $.FSet " "}}
|
|
{{range .Funcs}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{example_text .Name $.Examples $.FSet " "}}
|
|
{{end}}{{range .Methods}}{{node .Decl $.FSet}}
|
|
{{comment_text .Doc " " "\t"}}
|
|
{{$name := printf "%s_%s" $tname .Name}}{{example_text $name $.Examples $.FSet " "}}
|
|
{{end}}{{end}}{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with $.Notes}}
|
|
{{range $marker, $content := .}}
|
|
{{noteTitle $marker}}s
|
|
|
|
{{range $content}}{{comment_text . " " "\t"}}
|
|
{{end}}{{end}}{{end}}{{end}}{{/*
|
|
|
|
---------------------------------------
|
|
|
|
*/}}{{with .Dirs}}
|
|
SUBDIRECTORIES
|
|
{{if $.DirFlat}}{{range .List}}{{if .HasPkg}}
|
|
{{.Path}}{{end}}{{end}}
|
|
{{else}}{{range .List}}
|
|
{{repeat `. ` .Depth}}{{.Name}}{{end}}
|
|
{{end}}{{end}}
|