fix(configtest): all servers in the config if no args #1184 (#1189)

This commit is contained in:
Kota Kanbe
2021-03-03 12:51:07 +09:00
committed by GitHub
parent 02286b0c59
commit 1ec31d7be9
2 changed files with 10 additions and 6 deletions

View File

@@ -119,7 +119,11 @@ func (p *ConfigtestCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interfa
}
}
if 0 < len(servernames) {
// if scan target servers are specified by args, set to the config
c.Conf.Servers = targets
} else {
// if not specified by args, scan all servers in the config
targets = c.Conf.Servers
}
logging.Log.Info("Validating config...")