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

Persisting config values could be less verbose #5

Open
m-triassi opened this issue Nov 30, 2023 · 0 comments
Open

Persisting config values could be less verbose #5

m-triassi opened this issue Nov 30, 2023 · 0 comments
Assignees
Labels
refactor Functionality should be the same but code quality should improve

Comments

@m-triassi
Copy link
Owner

Description

Look into using viper.AllSettings() to persist values in config that haven't been passed as flags. Currently the set command very verbosely looks up all config values, and sets them as the default values for the flag if they're not passed. If this is not done, then all config values will be wiped.

I suspect this is not the most correct way to persist old values when the flag isn't passed. I imagine there's something i can do with viper.AllSettings() and merging the passed values with the given map and setting that? I should explore that in a future refactor.

Originally posted by @m-triassi in #4 (comment)

@m-triassi m-triassi self-assigned this Nov 30, 2023
@m-triassi m-triassi added enhancement New feature or request refactor Functionality should be the same but code quality should improve and removed enhancement New feature or request labels Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
refactor Functionality should be the same but code quality should improve
Projects
None yet
Development

No branches or pull requests

1 participant