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

Remove flag.Parse() from avisession.go #2969

Open
dvirgilad opened this issue Jul 15, 2024 · 0 comments
Open

Remove flag.Parse() from avisession.go #2969

dvirgilad opened this issue Jul 15, 2024 · 0 comments

Comments

@dvirgilad
Copy link

dvirgilad commented Jul 15, 2024

Is your feature request related to a problem? Please describe.

Recently my team has been working on a crossplane provider for AVI, which uses the go SDK (through the terraform AVI provider). We ran into an issue with our flag parser whenever a flag was passed. We were not using the default flag package.
We traced the issue back to this function:

func NewAviSession(host string, username string, options ...func(*AviSession) error) (*AviSession, error) {
if flag.Parsed() == false {
flag.Parse()
}

Describe the solution you'd like

For an SDK, I don't really understand why it should parse flags. Considering it cannot be built into an executable (AFAIK). Would like to hear others thoughts about this.
Cheers.

Describe alternatives you've considered

For the time being, my team has implemented a solution using the default flag package.

Additional context

No response

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

No branches or pull requests

1 participant