github.com/phsym/gomarkdoc@v0.5.4/templates/package.gotxt (about)

     1  {{- if eq .Name "main" -}}
     2  	{{- header .Level .Dirname -}}
     3  {{- else -}}
     4  	{{- header .Level .Name -}}
     5  {{- end -}}
     6  
     7  {{- template "import" . -}}
     8  
     9  {{- template "doc" .Doc -}}
    10  
    11  {{- range .Examples -}}
    12  	{{- template "example" . -}}
    13  {{- end -}}
    14  
    15  {{- header (add .Level 1) "Index" -}}
    16  
    17  {{- template "index" . -}}
    18  
    19  {{- if len .Consts -}}
    20  
    21  	{{- header (add .Level 1) "Constants" -}}
    22  
    23  	{{- range .Consts -}}
    24  		{{- template "value" . -}}
    25  	{{- end -}}
    26  
    27  {{- end -}}
    28  
    29  {{- if len .Vars -}}
    30  
    31  	{{- header (add .Level 1) "Variables" -}}
    32  
    33  	{{- range .Vars -}}
    34  		{{- template "value" . -}}
    35  	{{- end -}}
    36  
    37  {{- end -}}
    38  
    39  {{- range .Funcs -}}
    40  	{{- template "func" . -}}
    41  {{- end -}}
    42  
    43  {{- range .Types -}}
    44  	{{- template "type" . -}}
    45  {{- end -}}