github.com/graybobo/golang.org-package-offline-cache@v0.0.0-20200626051047-6608995c132f/x/tools/godoc/static/package.txt (about)

     1  {{$info := .}}{{$filtered := .IsFiltered}}{{/*
     2  
     3  ---------------------------------------
     4  
     5  */}}{{if $filtered}}{{range .PAst}}{{range .Decls}}{{node $info .}}
     6  
     7  {{end}}{{end}}{{else}}{{with .PAst}}{{range $filename, $ast := .}}{{$filename}}:
     8  {{node $ $ast}}{{end}}{{end}}{{end}}{{/*
     9  
    10  ---------------------------------------
    11  
    12  */}}{{if and $filtered (not (or .PDoc .PAst))}}No match found.
    13  {{end}}{{with .PDoc}}{{if $.IsMain}}COMMAND DOCUMENTATION
    14  
    15  {{comment_text .Doc "    " "\t"}}
    16  {{else}}{{if not $filtered}}PACKAGE DOCUMENTATION
    17  
    18  package {{.Name}}
    19      import "{{.ImportPath}}"
    20  
    21  {{comment_text .Doc "    " "\t"}}
    22  {{example_text $ "" "    "}}{{end}}{{/*
    23  
    24  ---------------------------------------
    25  
    26  */}}{{with .Consts}}{{if not $filtered}}CONSTANTS
    27  
    28  {{end}}{{range .}}{{node $ .Decl}}
    29  {{comment_text .Doc "    " "\t"}}
    30  {{end}}{{end}}{{/*
    31  
    32  ---------------------------------------
    33  
    34  */}}{{with .Vars}}{{if not $filtered}}VARIABLES
    35  
    36  {{end}}{{range .}}{{node $ .Decl}}
    37  {{comment_text .Doc "    " "\t"}}
    38  {{end}}{{end}}{{/*
    39  
    40  ---------------------------------------
    41  
    42  */}}{{with .Funcs}}{{if not $filtered}}FUNCTIONS
    43  
    44  {{end}}{{range .}}{{node $ .Decl}}
    45  {{comment_text .Doc "    " "\t"}}
    46  {{example_text $ .Name "    "}}{{end}}{{end}}{{/*
    47  
    48  ---------------------------------------
    49  
    50  */}}{{with .Types}}{{if not $filtered}}TYPES
    51  
    52  {{end}}{{range .}}{{$tname := .Name}}{{node $ .Decl}}
    53  {{comment_text .Doc "    " "\t"}}
    54  {{/*
    55  
    56  ---------------------------------------
    57  
    58  */}}{{if .Consts}}{{range .Consts}}{{node $ .Decl}}
    59  {{comment_text .Doc "    " "\t"}}
    60  {{end}}{{end}}{{/*
    61  
    62  ---------------------------------------
    63  
    64  */}}{{if .Vars}}{{range .Vars}}{{node $ .Decl}}
    65  {{comment_text .Doc "    " "\t"}}
    66  {{range $name := .Names}}{{example_text $ $name "    "}}{{end}}{{end}}{{end}}{{/*
    67  
    68  ---------------------------------------
    69  
    70  */}}{{if .Funcs}}{{range .Funcs}}{{node $ .Decl}}
    71  {{comment_text .Doc "    " "\t"}}
    72  {{example_text $ .Name "    "}}{{end}}{{end}}{{/*
    73  
    74  ---------------------------------------
    75  
    76  */}}{{if .Methods}}{{range .Methods}}{{node $ .Decl}}
    77  {{comment_text .Doc "    " "\t"}}
    78  {{$name := printf "%s_%s" $tname .Name}}{{example_text $ $name "    "}}{{end}}{{end}}{{/*
    79  
    80  ---------------------------------------
    81  
    82  */}}{{end}}{{end}}{{/*
    83  
    84  ---------------------------------------
    85  
    86  */}}{{if and $filtered (not (or .Consts (or .Vars (or .Funcs .Types))))}}No match found.
    87  {{end}}{{/*
    88  
    89  ---------------------------------------
    90  
    91  */}}{{end}}{{/*
    92  
    93  ---------------------------------------
    94  
    95  */}}{{with $.Notes}}
    96  {{range $marker, $content := .}}
    97  {{$marker}}S
    98  
    99  {{range $content}}{{comment_text .Body "   " "\t"}}
   100  {{end}}{{end}}{{end}}{{end}}{{/*
   101  
   102  ---------------------------------------
   103  
   104  */}}{{if not $filtered}}{{with .Dirs}}SUBDIRECTORIES
   105  {{if $.DirFlat}}{{range .List}}{{if .HasPkg}}
   106  	{{.Path}}{{end}}{{end}}
   107  {{else}}{{range .List}}
   108  	{{repeat `. ` .Depth}}{{.Name}}{{end}}
   109  {{end}}{{end}}{{/*
   110  
   111  ---------------------------------------
   112  
   113  */}}{{end}}{{/*
   114  Make sure there is no newline at the end of this file.
   115  perl -i -pe 'chomp if eof' package.txt
   116  */}}