From 47320e8fa7b02ead4a4796e39a0dce2fadd3db7c Mon Sep 17 00:00:00 2001 From: Carlo Goetz Date: Fri, 25 Sep 2026 15:29:44 +0200 Subject: [PATCH] fix(client): skip setBody for non-nil interfaces pointing to a nil concrete value --- languages/golang/templates/client.mustache | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/golang/templates/client.mustache b/languages/golang/templates/client.mustache index e9f0ecf..d420b1f 100644 --- a/languages/golang/templates/client.mustache +++ b/languages/golang/templates/client.mustache @@ -345,7 +345,7 @@ func (c *APIClient) prepareRequest( var body *bytes.Buffer // Detect postBody type and post. - if postBody != nil { + if !IsNil(postBody) { contentType := headerParams["Content-Type"] if contentType == "" { contentType = detectContentType(postBody)