More readable code

Signed-off-by: Jean-Laurent de Morlhon <jeanlaurent@morlhon.net>
This commit is contained in:
Jean-Laurent de Morlhon 2015-11-19 17:15:11 +01:00
parent b82f9a8509
commit b6519d43e9
1 changed files with 3 additions and 3 deletions

View File

@ -356,14 +356,14 @@ func getDriverOpts(c CommandLine, mcnflags []mcnflag.Flag) drivers.DriverOptions
for _, name := range c.FlagNames() {
getter, ok := c.Generic(name).(flag.Getter)
if !ok {
if ok {
driverOpts.Values[name] = getter.Get()
} else {
// TODO: This is pretty hacky. StringSlice is the only
// type so far we have to worry about which is not a
// Getter, though.
driverOpts.Values[name] = c.StringSlice(name)
continue
}
driverOpts.Values[name] = getter.Get()
}
return driverOpts