Skip to content

Commit

Permalink
Simplify thrift generator for setter methods
Browse files Browse the repository at this point in the history
Summary:
To eventually get rid of usage of non-compat setter methods

#build_rule_type[go_library,go_binary]

Reviewed By: podtserkovskiy

Differential Revision: D69127191

fbshipit-source-id: a8c215e3f1cac9deef1c6d5bbd14a76856a1c03c
  • Loading branch information
inesusvet authored and facebook-github-bot committed Feb 5, 2025
1 parent 7a3a7b5 commit 2f882ec
Showing 1 changed file with 0 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ func (x *{{struct:go_name}}) {{field:go_setter_name}}{{#program:compat_setters?}
{{#program:compat_setters?}}

func (x *{{struct:go_name}}) {{field:go_setter_name}}(value {{#field:compat_setter_pointer?}}*{{/field:compat_setter_pointer?}}{{#field:type}}{{> common/type}}{{/field:type}}) *{{struct:go_name}} {
{{#field:compat_setter_pointer?}}
{{^field:pointer?}}
if (value == nil) {
x.{{field:go_name}} = nil
return x
}
{{/field:pointer?}}
{{/field:compat_setter_pointer?}}
x.{{field:go_name}} = {{field:compat_setter_value_op}}value
return x
}
Expand Down

0 comments on commit 2f882ec

Please sign in to comment.