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

Combine cobra/viper configurations with any zcash.conf settings #291

Open
benzcash opened this issue Jun 22, 2020 · 0 comments
Open

Combine cobra/viper configurations with any zcash.conf settings #291

benzcash opened this issue Jun 22, 2020 · 0 comments

Comments

@benzcash
Copy link
Contributor

Currently the configurations are separate, it would make more sense to combine them!

For example:

If the user specified 3 of these but forgot one, then we'd get the values from the conf file, but would that be confusing to the user? Maybe throw an error if any of these 4 are specified on the command line but not all of them.

OR, a really nice thing would be to take the values from the file (if it's specified, I understand that the goal of this PR is that the conf file doesn't have to be specified, doesn't have to exist on this machine), and then the command-line options override the values read from the file. That's how zcashd works -- command-line arguments override config file values.

But if you think that's too much, that could be a separate PR.

One really minor suggestion is to refactor this test (if all the strings are non-empty) into a separate function that can be called from two places (here and at line 69).

Originally posted by @LarryRuane in #284

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

1 participant