Better logging for agents configuration

This commit is contained in:
Deluan
2021-11-25 15:48:32 -05:00
parent 913a4cf546
commit 20cdd38fc4
3 changed files with 22 additions and 10 deletions
+4 -1
View File
@@ -18,7 +18,10 @@ type Agents struct {
}
func New(ds model.DataStore) *Agents {
order := strings.Split(conf.Server.Agents, ",")
var order []string
if conf.Server.Agents != "" {
order = strings.Split(conf.Server.Agents, ",")
}
order = append(order, PlaceholderAgentName)
var res []Interface
for _, name := range order {