vmware / alb-sdk

Avi SDK and Utilities
Apache License 2.0
70 stars 71 forks source link

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

Open dvirgilad opened 4 months ago

dvirgilad commented 4 months ago

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: https://github.com/vmware/alb-sdk/blob/cc857152bc6721969a80f10c62c388d1380bdf3c/go/session/avisession.go#L306-L309

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