|
22 | 22 | {{- range .Funcs -}}
|
23 | 23 | <li class="Documentation-indexFunction">
|
24 | 24 | <a href="#{{.Name}}">{{render_synopsis .Decl}}</a>
|
| 25 | + {{- if .IsDeprecated -}} |
| 26 | + <span class="Documentation-indexDeprecated">deprecated</span> |
| 27 | + {{- end -}} |
25 | 28 | </li>{{"\n"}}
|
26 | 29 | {{- end -}}
|
27 | 30 |
|
28 | 31 | {{- range .Types -}}
|
29 | 32 | {{- $tname := .Name -}}
|
30 |
| - <li class="Documentation-indexType"><a href="#{{$tname}}">type {{$tname}}</a></li>{{"\n"}} |
| 33 | + <li class="Documentation-indexType"><a href="#{{$tname}}">type {{$tname}}</a> |
| 34 | + {{- if .IsDeprecated -}} |
| 35 | + <span class="Documentation-indexDeprecated">deprecated</span> |
| 36 | + {{- end -}} |
| 37 | + </li>{{"\n"}} |
31 | 38 | {{- with .Funcs -}}
|
32 | 39 | <li><ul class="Documentation-indexTypeFunctions">{{"\n" -}}
|
33 |
| - {{range .}}<li><a href="#{{.Name}}">{{render_synopsis .Decl}}</a></li>{{"\n"}}{{end}} |
| 40 | + {{range .}} |
| 41 | + <li><a href="#{{.Name}}">{{render_synopsis .Decl}}</a> |
| 42 | + {{- if .IsDeprecated -}} |
| 43 | + <span class="Documentation-indexDeprecated">deprecated</span> |
| 44 | + {{- end -}} |
| 45 | + </li>{{"\n"}} |
| 46 | + {{end}} |
34 | 47 | </ul></li>{{"\n" -}}
|
35 | 48 | {{- end -}}
|
36 | 49 | {{- with .Methods -}}
|
37 | 50 | <li><ul class="Documentation-indexTypeMethods">{{"\n" -}}
|
38 |
| - {{range .}}<li><a href="#{{$tname}}.{{.Name}}">{{render_synopsis .Decl}}</a></li>{{"\n"}}{{end}} |
| 51 | + {{range .}} |
| 52 | + <li><a href="#{{$tname}}.{{.Name}}">{{render_synopsis .Decl}}</a> |
| 53 | + {{- if .IsDeprecated -}} |
| 54 | + <span class="Documentation-indexDeprecated">deprecated</span> |
| 55 | + {{- end -}} |
| 56 | + </li>{{"\n"}} |
| 57 | + {{end}} |
39 | 58 | </ul></li>{{"\n" -}}
|
40 | 59 | {{- end -}}
|
41 | 60 | {{- end -}}
|
|
86 | 105 | <div class="Documentation-function">
|
87 | 106 | {{- $id := safe_id .Name -}}
|
88 | 107 | <h4 tabindex="-1" id="{{$id}}" data-kind="function" class="Documentation-functionHeader">
|
89 |
| - <span>func {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a></span> |
| 108 | + <span> |
| 109 | + func {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a> |
| 110 | + {{- if .IsDeprecated -}} |
| 111 | + <span class="Documentation-bodyDeprecated">deprecated</span> |
| 112 | + <a class="Documentation-deprecatedShowLink" href="?">Show</a> |
| 113 | + {{- end -}} |
| 114 | + </span> |
90 | 115 | {{- template "since_version" .Name -}}
|
91 | 116 | </h4>{{"\n"}}
|
92 |
| - {{- template "declaration" . -}} |
93 |
| - {{- template "example" (index $.Examples.Map .Name) -}} |
| 117 | + {{if not .IsDeprecated}} |
| 118 | + {{- template "declaration" . -}} |
| 119 | + {{- template "example" (index $.Examples.Map .Name) -}} |
| 120 | + {{end}} |
94 | 121 | </div>
|
95 | 122 | {{- end -}}
|
96 | 123 | {{- else -}}
|
|
109 | 136 | <span>type {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a></span>
|
110 | 137 | {{- template "since_version" .Name -}}
|
111 | 138 | </h4>{{"\n"}}
|
112 |
| - {{- template "declaration" . -}} |
113 |
| - {{- template "example" (index $.Examples.Map .Name) -}} |
| 139 | + {{if not .IsDeprecated}} |
| 140 | + {{- template "declaration" . -}} |
| 141 | + {{- template "example" (index $.Examples.Map .Name) -}} |
| 142 | + {{end}} |
114 | 143 |
|
115 | 144 | {{- range .Consts -}}
|
116 | 145 | <div class="Documentation-typeConstant">
|
|
128 | 157 | <div class="Documentation-typeFunc">
|
129 | 158 | {{- $id := safe_id .Name -}}
|
130 | 159 | <h4 tabindex="-1" id="{{$id}}" data-kind="function" class="Documentation-typeFuncHeader">
|
131 |
| - <span>func {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a></span> |
| 160 | + <span> |
| 161 | + func {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a> |
| 162 | + {{- if .IsDeprecated -}} |
| 163 | + <span class="Documentation-bodyDeprecated">deprecated</span> |
| 164 | + <a class="Documentation-deprecatedShowLink" href="?">Show</a> |
| 165 | + {{- end -}} |
| 166 | + </span> |
132 | 167 | {{- template "since_version" .Name -}}
|
133 | 168 | </h4>{{"\n"}}
|
134 |
| - {{- template "declaration" . -}} |
135 |
| - {{- template "example" (index $.Examples.Map .Name) -}} |
| 169 | + {{if not .IsDeprecated}} |
| 170 | + {{- template "declaration" . -}} |
| 171 | + {{- template "example" (index $.Examples.Map .Name) -}} |
| 172 | + {{end}} |
136 | 173 | </div>
|
137 | 174 | {{- end -}}
|
138 | 175 |
|
|
141 | 178 | {{- $name := (printf "%s.%s" $tname .Name) -}}
|
142 | 179 | {{- $id := (safe_id $name) -}}
|
143 | 180 | <h4 tabindex="-1" id="{{$id}}" data-kind="method" class="Documentation-typeMethodHeader">
|
144 |
| - <span>func ({{.Recv}}) {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a></span> |
| 181 | + <span> |
| 182 | + func ({{.Recv}}) {{source_link .Name .Decl}} <a class="Documentation-idLink" href="#{{$id}}">¶</a> |
| 183 | + {{- if .IsDeprecated -}} |
| 184 | + <span class="Documentation-bodyDeprecated">deprecated</span> |
| 185 | + <a class="Documentation-deprecatedShowLink" href="?">Show</a> |
| 186 | + {{- end -}} |
| 187 | + </span> |
145 | 188 | {{- template "since_version" $name -}}
|
146 | 189 | </h4>{{"\n"}}
|
147 |
| - {{- template "declaration" . -}} |
148 |
| - {{- template "example" (index $.Examples.Map $name) -}} |
| 190 | + {{if not .IsDeprecated}} |
| 191 | + {{- template "declaration" . -}} |
| 192 | + {{- template "example" (index $.Examples.Map $name) -}} |
| 193 | + {{end}} |
149 | 194 | </div>
|
150 | 195 | {{- end -}}
|
151 | 196 | </div>
|
|
0 commit comments