mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
Allow duplicates of modules
This leverages the recent config changes, extending it so that config is literally using passed config, rather than passed config value Uses cmdRunner as an example for #181 Because config turns into a map, names are the root keys, and an optional type is provided
This commit is contained in:
@@ -15,13 +15,13 @@ type Settings struct {
|
||||
cmd string
|
||||
}
|
||||
|
||||
func NewSettingsFromYAML(name string, ymlConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
func NewSettingsFromYAML(name string, moduleConfig *config.Config, globalConfig *config.Config) *Settings {
|
||||
|
||||
settings := Settings{
|
||||
common: cfg.NewCommonSettingsFromModule(name, ymlConfig, globalConfig),
|
||||
common: cfg.NewCommonSettingsFromModule(name, moduleConfig, globalConfig),
|
||||
|
||||
args: wtf.ToStrs(ymlConfig.UList("args")),
|
||||
cmd: ymlConfig.UString("cmd"),
|
||||
args: wtf.ToStrs(moduleConfig.UList("args")),
|
||||
cmd: moduleConfig.UString("cmd"),
|
||||
}
|
||||
|
||||
return &settings
|
||||
|
||||
Reference in New Issue
Block a user