From 12ce0c6682908d2a0989151baa0d5c1a41e2e825 Mon Sep 17 00:00:00 2001 From: tdakkota Date: Sat, 2 Dec 2023 10:46:23 +0300 Subject: [PATCH] fix(gen): add missing feature check --- gen/_template/response_encode.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/_template/response_encode.tmpl b/gen/_template/response_encode.tmpl index 7fa192bb2..1deab59c5 100644 --- a/gen/_template/response_encode.tmpl +++ b/gen/_template/response_encode.tmpl @@ -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 }}