diff options
author | Valery Piashchynski <[email protected]> | 2021-01-15 00:29:23 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-01-15 00:29:23 +0300 |
commit | aff4d2c7a92ae014988b27b27069b15a971b6c36 (patch) | |
tree | 50dc6e22db7ff51b0fcf3cce0a45b7b739e1f300 /tests | |
parent | 7542ae2d4c392290766405d31996378378aad975 (diff) |
Viper doesn't support `yaml` structure tags, it uses mapstructure
instead
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/plugins/config/plugin1.go | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/tests/plugins/config/plugin1.go b/tests/plugins/config/plugin1.go index a6c06aec..c77e7aa7 100755 --- a/tests/plugins/config/plugin1.go +++ b/tests/plugins/config/plugin1.go @@ -9,31 +9,31 @@ import ( type AllConfig struct { RPC struct { - Listen string `yaml:"listen"` - } `yaml:"rpc"` + Listen string `mapstructure:"listen"` + } `mapstructure:"rpc"` Reload struct { - Enabled bool `yaml:"enabled"` - Interval string `yaml:"interval"` - Patterns []string `yaml:"patterns"` + Enabled bool `mapstructure:"enabled"` + Interval string `mapstructure:"interval"` + Patterns []string `mapstructure:"patterns"` Services struct { HTTP struct { - Recursive bool `yaml:"recursive"` - Ignore []string `yaml:"ignore"` - Patterns []string `yaml:"patterns"` - Dirs []string `yaml:"dirs"` - } `yaml:"http"` + Recursive bool `mapstructure:"recursive"` + Ignore []string `mapstructure:"ignore"` + Patterns []string `mapstructure:"patterns"` + Dirs []string `mapstructure:"dirs"` + } `mapstructure:"http"` Jobs struct { - Recursive bool `yaml:"recursive"` - Ignore []string `yaml:"ignore"` - Dirs []string `yaml:"dirs"` - } `yaml:"jobs"` + Recursive bool `mapstructure:"recursive"` + Ignore []string `mapstructure:"ignore"` + Dirs []string `mapstructure:"dirs"` + } `mapstructure:"jobs"` RPC struct { - Recursive bool `yaml:"recursive"` - Patterns []string `yaml:"patterns"` - Dirs []string `yaml:"dirs"` - } `yaml:"rpc"` - } `yaml:"services"` - } `yaml:"reload"` + Recursive bool `mapstructure:"recursive"` + Patterns []string `mapstructure:"patterns"` + Dirs []string `mapstructure:"dirs"` + } `mapstructure:"rpc"` + } `mapstructure:"services"` + } `mapstructure:"reload"` } // ReloadConfig is a Reload configuration point. |