mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-13 22:38:01 +00:00
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. |
||
|---|---|---|
| .. | ||
| pilosa | ||
| pilosa-bench | ||
| backup.go | ||
| bench.go | ||
| check.go | ||
| config.go | ||
| export.go | ||
| import.go | ||
| inspect.go | ||
| restore.go | ||
| root.go | ||
| server.go | ||
| sort.go | ||