1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

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

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