-
Notifications
You must be signed in to change notification settings - Fork 257
Added helper func to get infra config with defaults applied #6255
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
base: main
Are you sure you want to change the base?
Conversation
Azure Dev CLI Install InstructionsInstall scriptsMacOS/Linux
bash: pwsh: WindowsPowerShell install MSI install Standalone Binary
MSI
Documentationlearn.microsoft.com documentationtitle: Azure Developer CLI reference
|
| } | ||
|
|
||
| // GetWithDefaults merges the provided infra options with the default provisioning options | ||
| func (o Options) GetWithDefaults(other ...Options) (Options, error) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't usually add the Get prefix to methods. And we typically reserve With.....() for option builder pattern.
This method is composing 3 layers or the same options into one, right ?
1- the current state in o Options
2- the provided state(s) from other ...Options
3- default for whatever is still not set.
I wonder why do we all of these. Are we making this too much complicated for some special use-case?
I wish we could just always start from defaultOptions and directly override values as we need.
Fixes #6254