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)