mirror of https://github.com/docker/cli.git
cli/compose/convert: driverObjectConfig - result 1 (error) is always nil (unparam)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 34f595975d
)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
7467a6a7de
commit
1a57296c26
|
@ -109,7 +109,7 @@ func Secrets(namespace Namespace, secrets map[string]composetypes.SecretConfig)
|
||||||
var obj swarmFileObject
|
var obj swarmFileObject
|
||||||
var err error
|
var err error
|
||||||
if secret.Driver != "" {
|
if secret.Driver != "" {
|
||||||
obj, err = driverObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
|
obj = driverObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
|
||||||
} else {
|
} else {
|
||||||
obj, err = fileObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
|
obj, err = fileObjectConfig(namespace, name, composetypes.FileObjectConfig(secret))
|
||||||
}
|
}
|
||||||
|
@ -161,7 +161,7 @@ type swarmFileObject struct {
|
||||||
Data []byte
|
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 != "" {
|
if obj.Name != "" {
|
||||||
name = obj.Name
|
name = obj.Name
|
||||||
} else {
|
} else {
|
||||||
|
@ -174,7 +174,7 @@ func driverObjectConfig(namespace Namespace, name string, obj composetypes.FileO
|
||||||
Labels: AddStackLabel(namespace, obj.Labels),
|
Labels: AddStackLabel(namespace, obj.Labels),
|
||||||
},
|
},
|
||||||
Data: []byte{},
|
Data: []byte{},
|
||||||
}, nil
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
func fileObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) {
|
func fileObjectConfig(namespace Namespace, name string, obj composetypes.FileObjectConfig) (swarmFileObject, error) {
|
||||||
|
|
Loading…
Reference in New Issue