fix(scan): scan all servers in the config if no args #1184 (#1188)

This commit is contained in:
Kota Kanbe
2021-03-03 12:30:30 +09:00
committed by GitHub
parent 1d0c5dea9f
commit 02286b0c59

View File

@@ -167,9 +167,12 @@ func (p *ScanCmd) Execute(_ context.Context, f *flag.FlagSet, _ ...interface{})
return subcommands.ExitUsageError
}
}
// if scan target servers are specified by args, set to the config
if 0 < len(servernames) {
// if scan target servers are specified by args, set to the config
c.Conf.Servers = target
} else {
// if not specified by args, scan all servers in the config
target = c.Conf.Servers
}
logging.Log.Debugf("%s", pp.Sprintf("%v", target))