diff --git a/configuration.go b/configuration.go index 81a15d5..d2c6a46 100644 --- a/configuration.go +++ b/configuration.go @@ -2,6 +2,7 @@ package main import ( "encoding/json" + "fmt" "os" ) @@ -23,5 +24,15 @@ func LoadConfiguration(path string) (conf *Configuration, err error) { return nil, err } + for i := 0; i < len(conf.Processes); i++ { + if conf.Processes[i].Process == "" { + return nil, fmt.Errorf("an empty process field found") + } + + if conf.Processes[i].Alias == "" { + conf.Processes[i].Alias = conf.Processes[i].Process + } + } + return conf, nil }