github.com/phsym/gomarkdoc@v0.5.4/templates/index.gotxt (about) 1 {{- if len .Consts -}} 2 3 {{- localHref "Constants" | link "Constants" | listEntry 0 -}} 4 5 {{- end -}} 6 7 {{- if len .Vars -}} 8 9 {{- localHref "Variables" | link "Variables" | listEntry 0 -}} 10 11 {{- end -}} 12 13 {{- range .Funcs -}} 14 15 {{- if .Receiver -}} 16 {{- codeHref .Location | link (escape .Name) | printf "func \\(%s\\) %s" (escape .Receiver) | localHref | link .Signature | listEntry 0 -}} 17 {{- else -}} 18 {{- codeHref .Location | link (escape .Name) | printf "func %s" | localHref | link .Signature | listEntry 0 -}} 19 {{- end -}} 20 21 {{- end -}} 22 23 {{- range .Types -}} 24 25 {{- codeHref .Location | link (escape .Name) | printf "type %s" | localHref | link .Title | listEntry 0 -}} 26 27 {{- range .Funcs -}} 28 {{- if .Receiver -}} 29 {{- codeHref .Location | link (escape .Name) | printf "func \\(%s\\) %s" (escape .Receiver) | localHref | link .Signature | listEntry 1 -}} 30 {{- else -}} 31 {{- codeHref .Location | link (escape .Name) | printf "func %s" | localHref | link .Signature | listEntry 1 -}} 32 {{- end -}} 33 {{- end -}} 34 35 {{- range .Methods -}} 36 {{- if .Receiver -}} 37 {{- codeHref .Location | link (escape .Name) | printf "func \\(%s\\) %s" (escape .Receiver) | localHref | link .Signature | listEntry 1 -}} 38 {{- else -}} 39 {{- codeHref .Location | link (escape .Name) | printf "func %s" | localHref | link .Signature | listEntry 1 -}} 40 {{- end -}} 41 {{- end -}} 42 43 {{- end -}} 44 45 {{- spacer -}}