diff --git a/templates/go/client.mustache b/templates/go/client.mustache index 808a1d4..f70e117 100644 --- a/templates/go/client.mustache +++ b/templates/go/client.mustache @@ -307,7 +307,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)