Skip to content

Commit

Permalink
Simplify server JSON handler code for RPC methods (#36)
Browse files Browse the repository at this point in the history
* Simplify server JSON handler code for RPC methods

* Shorten generated code: Move defer-panic up to the .ServeHTTP() method

No need to define defer-panic in JSON handler for each generated
RPC method, since the generated Go methods are private and called
only from within .ServerHTTP().
  • Loading branch information
VojtechVitek authored Aug 25, 2023
1 parent c081f17 commit 07c019e
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 206 deletions.
175 changes: 61 additions & 114 deletions _examples/golang-basics/example.gen.go

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

88 changes: 33 additions & 55 deletions _examples/golang-imports/api.gen.go

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

Loading

0 comments on commit 07c019e

Please sign in to comment.