Skip to content

Commit

Permalink
Merge pull request #1125 from tdakkota/fix/feature-check
Browse files Browse the repository at this point in the history
fix(gen): add missing feature check
  • Loading branch information
ernado authored Dec 2, 2023
2 parents b8073f1 + 12ce0c6 commit 88c9bc6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/_template/response_encode.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

{{- if $.Error }}
{{- $otel := $.OpenTelemetryEnabled }}
func encodeErrorResponse(response {{ $.ErrorGoType }}, w http.ResponseWriter, span trace.Span) error {
func encodeErrorResponse(response {{ $.ErrorGoType }}, w http.ResponseWriter, {{ if $otel }}span trace.Span{{ end }}) error {
{{- $infos := $.Error.ResponseInfo $otel }}
{{- if eq (len $infos) 1 }}
{{- range $info := $infos }}
Expand Down

0 comments on commit 88c9bc6

Please sign in to comment.