From b84e21cd05e77d12f2cc6ae1a72b852f9d58ed59 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Wed, 21 Jun 2017 00:11:59 -0400 Subject: [PATCH] Fix lint errors merged while new lint branch was in PR. Signed-off-by: Daniel Nephin --- cli/command/service/opts.go | 6 +++++- cli/command/service/update.go | 5 ++--- cli/config/configfile/file.go | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/cli/command/service/opts.go b/cli/command/service/opts.go index 5d1595b055..4c1425c42c 100644 --- a/cli/command/service/opts.go +++ b/cli/command/service/opts.go @@ -354,7 +354,11 @@ func convertNetworks(ctx context.Context, apiClient client.NetworkAPIClient, net if err != nil { return nil, err } - netAttach = append(netAttach, swarm.NetworkAttachmentConfig(net)) + netAttach = append(netAttach, swarm.NetworkAttachmentConfig{ // nolint: gosimple + Target: net.Target, + Aliases: net.Aliases, + DriverOpts: net.DriverOpts, + }) } sort.Sort(byNetworkTarget(netAttach)) return netAttach, nil diff --git a/cli/command/service/update.go b/cli/command/service/update.go index 4b49b738ee..a80bf01ef1 100644 --- a/cli/command/service/update.go +++ b/cli/command/service/update.go @@ -503,9 +503,8 @@ func updatePlacementPreferences(flags *pflag.FlagSet, placement *swarm.Placement } if flags.Changed(flagPlacementPrefAdd) { - for _, addition := range flags.Lookup(flagPlacementPrefAdd).Value.(*placementPrefOpts).prefs { - newPrefs = append(newPrefs, addition) - } + newPrefs = append(newPrefs, + flags.Lookup(flagPlacementPrefAdd).Value.(*placementPrefOpts).prefs...) } placement.Preferences = newPrefs diff --git a/cli/config/configfile/file.go b/cli/config/configfile/file.go index 78024acf54..9c2c4eec6d 100644 --- a/cli/config/configfile/file.go +++ b/cli/config/configfile/file.go @@ -173,7 +173,7 @@ func (configFile *ConfigFile) ParseProxyConfig(host string, runOpts []string) ma cfgKey = host } - config, _ := configFile.Proxies[cfgKey] + config := configFile.Proxies[cfgKey] permitted := map[string]*string{ "HTTP_PROXY": &config.HTTPProxy, "HTTPS_PROXY": &config.HTTPSProxy,