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

chore: replace global variables with Config struct #26

Closed
wants to merge 2 commits into from

Conversation

colesnodgrass
Copy link
Member

No description provided.

}
printProviderDetails(provider)
printProviderDetails(cfg.Provider)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is where I find it useful to have a singleton Config struct, which can be constructed at the root command (or the root of the command subtree that makes use of those configs), as opposed to threading it through to all of these subcommand constructors.

I also thing its a little odd to take a config struct here, modify it by assigning the TelClient and then passing that along. So I would suggest assigning TelClient in the caller (parent command)

@colesnodgrass colesnodgrass deleted the cole/pass-telclient branch August 26, 2024 16:01
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

Successfully merging this pull request may close these issues.

2 participants