From 34f595975de83b7ae3162d3f513e164c39fd8124 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 29 Oct 2019 01:47:58 +0100 Subject: [PATCH] cli/compose/convert: driverObjectConfig - result 1 (error) is always nil (unparam) Signed-off-by: Sebastiaan van Stijn --- cli/compose/convert/compose.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/compose/convert/compose.go b/cli/compose/convert/compose.go index 983e7b52ea..189a909622 100644 --- a/cli/compose/convert/compose.go +++ b/cli/compose/convert/compose.go @@ -109,7 +109,7 @@ func Secrets(namespace Namespace, secrets map[string]composetypes.SecretConfig) var obj swarmFileObject var err error if secret.Driver != "" { - obj, err = driverObjectConfig(namespace, name, composetypes.FileObjectConfig(secret)) + obj = driverObjectConfig(namespace, name, composetypes.FileObjectConfig(secret)) } else { obj, err = fileObjectConfig(namespace, name, composetypes.FileObjectConfig(secret)) } @@ -161,7 +161,7 @@ type swarmFileObject struct { Data []byte } -func driverObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) { +func driverObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) swarmFileObject { if obj.Name != "" { name = obj.Name } else { @@ -174,7 +174,7 @@ func driverObjectConfig(namespace Namespace, name string, obj composetypes.FileO Labels: AddStackLabel(namespace, obj.Labels), }, Data: []byte{}, - }, nil + } } func fileObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) {