summaryrefslogtreecommitdiff
path: root/cmd/rr
diff options
context:
space:
mode:
authorWolfy-J <[email protected]>2019-12-23 16:19:39 +0300
committerWolfy-J <[email protected]>2019-12-23 16:19:39 +0300
commit23e3ca71347aec2152b17def2bb37d4927a6aebe (patch)
tree645dc399aec15b414dc40d3942c43b095633e7c6 /cmd/rr
parenta11a3a5511a7b986f06c5921932e3438a0a543d7 (diff)
- the ability to specify config via JSON string
Diffstat (limited to 'cmd/rr')
-rw-r--r--cmd/rr/cmd/root.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/rr/cmd/root.go b/cmd/rr/cmd/root.go
index d6929473..515e6419 100644
--- a/cmd/rr/cmd/root.go
+++ b/cmd/rr/cmd/root.go
@@ -33,6 +33,7 @@ import (
var (
cfgFile, workDir, logFormat string
override []string
+ mergeJson string
// Verbose enables verbosity mode (container specific).
Verbose bool
@@ -73,6 +74,7 @@ func init() {
CLI.PersistentFlags().StringVarP(&logFormat, "logFormat", "l", "color", "select log formatter (color, json, plain)")
CLI.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file (default is .rr.yaml)")
CLI.PersistentFlags().StringVarP(&workDir, "workDir", "w", "", "work directory")
+ CLI.PersistentFlags().StringVarP(&mergeJson, "jsonConfig", "j", "", "merge json configuration")
CLI.PersistentFlags().StringArrayVarP(
&override,
@@ -89,7 +91,7 @@ func init() {
configureLogger(logFormat)
- cfg, err := util.LoadConfig(cfgFile, []string{"."}, ".rr", override)
+ cfg, err := util.LoadConfig(cfgFile, []string{"."}, ".rr", override, mergeJson)
if err != nil {
Logger.Warnf("config: %s", err)
return