We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I think it would be great to be able to set a prefix for the setter functions.
For example:
//go:generate gonstructor --type=Structure --constructorTypes=builder --setterPrefix=With type Structure struct { foo string }
Could generate:
type StructureBuilder struct { foo string } func NewStructureBuilder() *StructureBuilder { return &StructureBuilder{} } func (b *StructureBuilder) WithFoo(foo string) *StructureBuilder { b.foo = foo return b } func (b *StructureBuilder) Build() *Structure { return &Structure{ foo: b.foo, } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I think it would be great to be able to set a prefix for the setter functions.
For example:
Could generate:
The text was updated successfully, but these errors were encountered: