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

Consider unify tls files and addr arguments fetching #450

Open
artek-koltun opened this issue May 21, 2024 · 0 comments
Open

Consider unify tls files and addr arguments fetching #450

artek-koltun opened this issue May 21, 2024 · 0 comments
Assignees

Comments

@artek-koltun
Copy link
Collaborator

We have these lines repeated in many places

tlsFiles, err := c.Flags().GetString(common.TLSFiles)
cobra.CheckErr(err)

addr, err := c.Flags().GetString(common.AddrCmdLineArg)
cobra.CheckErr(err)

We can consider if we can remove that duplication by:

  • search in cobra if they already have a dedicated mechanism to solve such issue.
  • extract into a separate func
  • fetch into global vars and reuse them in cobra commands
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants