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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user