Skip to content

Commit

Permalink
Move req/resp struct definitions to types.go
Browse files Browse the repository at this point in the history
Summary:
Makes `svcs.go` smaller and easier to read.

Moves req/resp structs right next to regular program structs. All in one place. Consistent.

Reviewed By: awalterschulze

Differential Revision: D63611565

fbshipit-source-id: 2211f37ae2013794bc10733789377c6e9aacd50a
  • Loading branch information
echistyakov authored and facebook-github-bot committed Sep 30, 2024
1 parent 5dbcc03 commit d74c278
Show file tree
Hide file tree
Showing 103 changed files with 24,159 additions and 24,086 deletions.
5 changes: 0 additions & 5 deletions thrift/compiler/generate/templates/go/svc/client.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,3 @@ func (c *{{service:go_name}}Client) {{> svc/func_signature_with_ctx}} {
}
{{/function:go_supported?}}
{{/service:functions}}

{{#service:req_resp_structs}}
{{> types/struct}}

{{/service:req_resp_structs}}
11 changes: 11 additions & 0 deletions thrift/compiler/generate/templates/go/types.go.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,17 @@ var _ = thrift.ZERO
{{/program:structs}}
{{/program:structs?}}

{{! Req/resp srtucts }}
{{#program:services?}}
// Service req/resp structs (below)
{{#program:services}}
{{#service:req_resp_structs}}
{{> types/struct}}

{{/service:req_resp_structs}}
{{/program:services}}
{{/program:services?}}

{{#program:structs?}}
{{> common/registry}}
{{/program:structs?}}
Loading

0 comments on commit d74c278

Please sign in to comment.