featurebase/cmd
Matt Jaffee e1a582ad2c experimenting with cascading config
2 changes unrelated to cascading config:

1. using cobra.Command.RunE instead of just Run - similar behavior to log + exit,
but simpler. Also prints error message, then usage, then error again which is
nice.

2. getting serveCmd.Flags() once, and re-using it. More readable methinks.

For cascading config, I'm trying to set things up so that we can define the
flags once, and have them work from a config file, environment variable, or
command line. I also don't want references to viper scattered throughout our
code, so I want to set the config at startup, and not touch it from then on.

The idea here is to iterate through the set up command line flags, and then set
their values from viper which knows about the commmand line, the environment,
and the config file, and will pick the right one. The command line flags were
set pointing to the correct config values in the pilosa object, so the right
values will be set automatically.
2017-03-17 16:43:04 -05:00
..
pilosa code review tweaks 2017-03-07 11:30:31 -06:00
pilosa-bench Migrate from Umbel to Pilosa organization on Github 2016-11-28 15:21:11 -06:00
backup.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
bench.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
check.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
config.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
export.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
import.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
inspect.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
restore.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
root.go fix short help strings on commands 2017-03-06 16:45:37 -06:00
server.go experimenting with cascading config 2017-03-17 16:43:04 -05:00
sort.go fix short help strings on commands 2017-03-06 16:45:37 -06:00