Skip to content
New issue

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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(go): use functional options pattern #3306

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

fix(go): use functional options pattern #3306

wants to merge 1 commit into from

Conversation

millotp
Copy link
Collaborator

@millotp millotp commented Jul 3, 2024

馃Л What and Why

Use the functional pattern for options which is easier to work with and more widely spread (example).

@millotp millotp self-assigned this Jul 3, 2024
Copy link

github-actions bot commented Jul 3, 2024

馃獡 The generated code will be pushed at the end of the CI.

Action triggered by commit a76f485e2d5b1e71f49e7e8d672458be3697d688.

Please do not push any generated code to this pull request.

@@ -1,3 +1,3 @@
{{#isNull}}{{#inClientTest}}tests.ZeroValue[{{#isNullObject}}*{{clientPrefix}}.{{/isNullObject}}{{objectName}}](){{/inClientTest}}{{^inClientTest}}nil{{/inClientTest}}{{/isNull}}{{#isString}}"{{{value}}}"{{/isString}}{{#isInteger}}{{#isHelper}}{{^required}}{{^useAnonymousKey}}utils.ToPtr({{/useAnonymousKey}}{{/required}}{{/isHelper}}{{{value}}}{{#isHelper}}{{^required}}{{^useAnonymousKey}}){{/useAnonymousKey}}{{/required}}{{/isHelper}}{{/isInteger}}{{#isLong}}{{{value}}}{{/isLong}}{{#isDouble}}{{{value}}}{{/isDouble}}{{#isBoolean}}{{{value}}}{{/isBoolean}}{{#isEnum}}{{clientPrefix}}.{{objectName}}("{{{value}}}"){{/isEnum}}{{#isArray}}
{{#isNull}}{{#inClientTest}}tests.ZeroValue[{{#isNullObject}}*{{clientPrefix}}.{{/isNullObject}}{{objectName}}](){{/inClientTest}}{{^inClientTest}}nil{{/inClientTest}}{{/isNull}}{{#isString}}"{{{value}}}"{{/isString}}{{#isInteger}}{{#isHelper}}{{^required}}{{^useAnonymousKey}}search.WithChunkedBatchBatchSize({{/useAnonymousKey}}{{/required}}{{/isHelper}}{{{value}}}{{#isHelper}}{{^required}}{{^useAnonymousKey}}){{/useAnonymousKey}}{{/required}}{{/isHelper}}{{/isInteger}}{{#isLong}}{{{value}}}{{/isLong}}{{#isDouble}}{{{value}}}{{/isDouble}}{{#isBoolean}}{{{value}}}{{/isBoolean}}{{#isEnum}}{{clientPrefix}}.{{objectName}}("{{{value}}}"){{/isEnum}}{{#isArray}}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hardcoded option, no idea how to make that work for all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant