Skip to content

Commit bb2133c

Browse files
authored
fix(go-generator): optional payload results in error when it's not set (#154)
1 parent 766a281 commit bb2133c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/go/client.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ func (c *APIClient) prepareRequest(
307307
var body *bytes.Buffer
308308
309309
// Detect postBody type and post.
310-
if postBody != nil {
310+
if !IsNil(postBody) {
311311
contentType := headerParams["Content-Type"]
312312
if contentType == "" {
313313
contentType = detectContentType(postBody)

0 commit comments

Comments
 (0)