From b6519d43e921755caefcdb54fd6faf3c79d9febd Mon Sep 17 00:00:00 2001 From: Jean-Laurent de Morlhon Date: Thu, 19 Nov 2015 17:15:11 +0100 Subject: [PATCH] More readable code Signed-off-by: Jean-Laurent de Morlhon --- commands/create.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/commands/create.go b/commands/create.go index f56eae019a..4e5474e3a2 100644 --- a/commands/create.go +++ b/commands/create.go @@ -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