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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go generation for optional parameters #469

Closed
Tracked by #1
baywet opened this issue Aug 10, 2021 · 1 comment · Fixed by #716
Closed
Tracked by #1

Go generation for optional parameters #469

baywet opened this issue Aug 10, 2021 · 1 comment · Fixed by #716
Assignees
Labels
enhancement New feature or request fixed Go

Comments

@baywet
Copy link
Member

baywet commented Aug 10, 2021

pending on #413

Go does not have support for optional parameters, nor does it support methods/functions overloads. We're leveraging such language functionalities in other languages so people without the need to provide query parameters/middleware options/request headers/a native response handler for as single request do not need to write .get(nil, nil, nil, nil) and can just write .get() instead.

Options to consider

  • generate overloads with different names (might be ugly)
  • align with azure go sdk guidelines and generate additional request options classes with one parameter for each original parameter, so people can just call .get(nil) (suggestion from @jhendrixMSFT on an internal thread)
  • investigate other options?

@darrelmiller to lean on the architecture/usage side.

@baywet baywet added enhancement New feature or request help wanted Issue caused by core project dependency modules or library needs more information Go labels Aug 10, 2021
@baywet baywet added this to the GA milestone Aug 10, 2021
@baywet baywet linked a pull request Nov 4, 2021 that will close this issue
@baywet baywet closed this as completed Nov 4, 2021
@baywet
Copy link
Member Author

baywet commented Nov 4, 2021

the decision was made to use options classes.

@baywet baywet assigned baywet and unassigned darrelmiller Nov 4, 2021
@baywet baywet added fixed and removed help wanted Issue caused by core project dependency modules or library needs more information hacktoberfest labels Nov 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fixed Go
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants