Skip to content

Commit

Permalink
Fix methods with no response value
Browse files Browse the repository at this point in the history
  • Loading branch information
VojtechVitek committed Nov 14, 2022
1 parent 3ff1e96 commit 7e1449e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions _examples/golang-basics/example.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions _examples/golang-imports/api.gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions server.go.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ func (s *{{$serviceName}}) serve{{ .Name | firstLetterToUpper }}JSON(ctx context

{{- if .Outputs | len}}
w.Write(respBody)
{{- else }}
w.Write([]byte("{}"))
{{- end}}
}
{{end}}
Expand Down

0 comments on commit 7e1449e

Please sign in to comment.