Skip to content

Address feedback for pr - https://github.com/Azure/azure-dev/pull/6255 #6284

@rajeshkamal5050

Description

@rajeshkamal5050

func (o Options) GetWithDefaults(other ...Options) (Options, error) {

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.


https://github.com/Azure/azure-dev/pull/6255/files/a00a3f56e11142e563d0ff822e7fd9c6fb196484#r2543771433 @vhvb1989

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions