@@ -68,14 +68,17 @@ var WebRPCServices = map[string][]string{
6868{{ if $opts.types -}}
6969type {{$service.Name}} interface {
7070 {{- range $_, $method := $service.Methods}}
71+ {{- $deprecated := index $method.Annotations "deprecated" -}}
7172 {{- if gt (len $method.Comments) 0 -}}
7273 {{- range $_, $comment := $method.Comments }}
7374 // {{ replaceAll $comment "\"" "'" }}
7475 {{- end }}
76+ {{- if $deprecated }}
77+ //
78+ {{- end }}
7579 {{- end }}
76- {{- $deprecated := index $method.Annotations "deprecated" -}}
7780 {{- if $deprecated }}
78- // Deprecated:
81+ // Deprecated: {{ $deprecated.Value }}
7982 {{- end }}
8083 {{ if eq $method.StreamOutput true -}}
8184 {{$method.Name}}(ctx context.Context{{range $_, $input := $method.Inputs}}, {{$input.Name}} {{template "field" dict "Name" $input.Name "Type" $input.Type "TypeMap" $typeMap "TypePrefix" $typePrefix "Optional" $input.Optional "TypeMeta" $input.Meta}}{{end}}, stream {{$method.Name}}StreamWriter) error
@@ -174,14 +177,17 @@ func (w *streamWriter) write(respPayload interface{}) error {
174177{{ range $_, $service := $services -}}
175178type {{$service.Name}}Client interface {
176179 {{- range $_, $method := $service.Methods}}
180+ {{- $deprecated := index $method.Annotations "deprecated" -}}
177181 {{- if gt (len $method.Comments) 0 }}
178182 {{- range $_, $comment := $method.Comments }}
179183 // {{ replaceAll $comment "\"" "'" }}
180184 {{- end }}
185+ {{- if $deprecated }}
186+ //
187+ {{- end }}
181188 {{- end }}
182- {{- $deprecated := index $method.Annotations "deprecated" -}}
183189 {{- if $deprecated }}
184- // Deprecated:
190+ // Deprecated: {{ $deprecated.Value }}
185191 {{- end }}
186192 {{ if eq $method.StreamOutput true -}}
187193 {{$method.Name}}(ctx context.Context{{range $_, $input := $method.Inputs}}, {{$input.Name}} {{template "field" dict "Name" $input.Name "Type" $input.Type "TypeMap" $typeMap "TypePrefix" $typePrefix "Optional" $input.Optional "TypeMeta" $input.Meta}}{{end}}) ({{$method.Name}}StreamReader, error)
0 commit comments