Skip to content

Persisting config values could be less verbose #5

@m-triassi

Description

@m-triassi

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)

Metadata

Metadata

Assignees

Labels

refactorFunctionality should be the same but code quality should improve

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions