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

Add initial cobra/viper setup #282

Merged
merged 1 commit into from
Jun 15, 2020
Merged

Add initial cobra/viper setup #282

merged 1 commit into from
Jun 15, 2020

Conversation

LandonTClipp
Copy link
Collaborator

@LandonTClipp LandonTClipp commented Jun 7, 2020

This closes #273 and adds usage of cobra CLI with viper config parsing. This is a really powerful thing and will allow us to do things like:

  1. Specify config from file
  2. Specify config from environment variables
  3. Merge file, env variables, and CLI arguments.

The mere fact that we can have a config file will simplify go generate workflows as now people won't have to specify all the CLI arguments explicitly.

@LandonTClipp LandonTClipp self-assigned this Jun 12, 2020
@LandonTClipp LandonTClipp changed the title WIP: Add initial cobra/viper setup Add initial cobra/viper setup Jun 14, 2020
Add main.go

Rename package, fix config, fix cobra, clean up

Adding environment variable configuration

Add ability to search environment variables and also a predefined set of
paths for a config file

Add showconfig command

Alphabetically sort config params

Fixing tests

Let's version control the mocks
@LandonTClipp LandonTClipp merged commit d08594a into vektra:master Jun 15, 2020
@LandonTClipp LandonTClipp deleted the cobra branch June 15, 2020 03:26
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.

Add cobra/viper support
1 participant