Use cobra and viper for configuration#175
Conversation
defuse
left a comment
There was a problem hiding this comment.
Nice improvement! Looks good modulo the one comment I left about visibly warning when there's no TLS.
LarryRuane
left a comment
There was a problem hiding this comment.
Very nice! When I run go build, (or make, same thing), a bunch of changes appear in source-controlled files go.mod and go.sum. Is that just me, or do those files also get modified for you? If so I think those changes should be part of this PR.
Yeah, forgot them. Added! |
Codecov Report
@@ Coverage Diff @@
## master #175 +/- ##
=========================================
Coverage ? 32.54%
=========================================
Files ? 11
Lines ? 1395
Branches ? 0
=========================================
Hits ? 454
Misses ? 884
Partials ? 57
Continue to review full report at Codecov.
|
|
Should any changes be made to |
Remove extra configs Move server startup to rootcmd Fixed broken insecure flags and example config name
1390b49 to
e71de4d
Compare
This PR is designed to use the cobra and viper packages to provide additional configure options.
Changes
go buildoutputslightwalletdExample usage:
Added functionality
Provide configuration from file
An example lightwalletd-example.yml is in the PR
Usage:
Or, rename it to just
lightwalletd.ymland it will be auto-discoveredProvide configuration from environment variables
The same options can be provided through environment variables
Example Usage:
** NOTE ** We can preface these environmental variable with a string like
LIGHTWALLETD_orLWD_to avoid collisions.