From d0d91bb0cd3061508a501dab2ec757a57d285cd2 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 8 Mar 2025 18:36:34 +0100 Subject: [PATCH] opts/swarmopts: remove redundant import aliases Signed-off-by: Sebastiaan van Stijn --- opts/swarmopts/config.go | 10 +++++----- opts/swarmopts/secret.go | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/opts/swarmopts/config.go b/opts/swarmopts/config.go index 1dc9de55f0..ff137304ac 100644 --- a/opts/swarmopts/config.go +++ b/opts/swarmopts/config.go @@ -8,12 +8,12 @@ import ( "strconv" "strings" - swarmtypes "github.com/docker/docker/api/types/swarm" + "github.com/docker/docker/api/types/swarm" ) // ConfigOpt is a Value type for parsing configs type ConfigOpt struct { - values []*swarmtypes.ConfigReference + values []*swarm.ConfigReference } // Set a new config value @@ -24,8 +24,8 @@ func (o *ConfigOpt) Set(value string) error { return err } - options := &swarmtypes.ConfigReference{ - File: &swarmtypes.ConfigReferenceFileTarget{ + options := &swarm.ConfigReference{ + File: &swarm.ConfigReferenceFileTarget{ UID: "0", GID: "0", Mode: 0o444, @@ -95,6 +95,6 @@ func (o *ConfigOpt) String() string { } // Value returns the config requests -func (o *ConfigOpt) Value() []*swarmtypes.ConfigReference { +func (o *ConfigOpt) Value() []*swarm.ConfigReference { return o.values } diff --git a/opts/swarmopts/secret.go b/opts/swarmopts/secret.go index d8c53a34fa..9f97627a5b 100644 --- a/opts/swarmopts/secret.go +++ b/opts/swarmopts/secret.go @@ -8,12 +8,12 @@ import ( "strconv" "strings" - swarmtypes "github.com/docker/docker/api/types/swarm" + "github.com/docker/docker/api/types/swarm" ) // SecretOpt is a Value type for parsing secrets type SecretOpt struct { - values []*swarmtypes.SecretReference + values []*swarm.SecretReference } // Set a new secret value @@ -24,8 +24,8 @@ func (o *SecretOpt) Set(value string) error { return err } - options := &swarmtypes.SecretReference{ - File: &swarmtypes.SecretReferenceFileTarget{ + options := &swarm.SecretReference{ + File: &swarm.SecretReferenceFileTarget{ UID: "0", GID: "0", Mode: 0o444, @@ -94,6 +94,6 @@ func (o *SecretOpt) String() string { } // Value returns the secret requests -func (o *SecretOpt) Value() []*swarmtypes.SecretReference { +func (o *SecretOpt) Value() []*swarm.SecretReference { return o.values }