Skip to content

Commit d0d91bb

Browse files
committed
opts/swarmopts: remove redundant import aliases
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent ad21055 commit d0d91bb

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

opts/swarmopts/config.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"strconv"
99
"strings"
1010

11-
swarmtypes "github.com/docker/docker/api/types/swarm"
11+
"github.com/docker/docker/api/types/swarm"
1212
)
1313

1414
// ConfigOpt is a Value type for parsing configs
1515
type ConfigOpt struct {
16-
values []*swarmtypes.ConfigReference
16+
values []*swarm.ConfigReference
1717
}
1818

1919
// Set a new config value
@@ -24,8 +24,8 @@ func (o *ConfigOpt) Set(value string) error {
2424
return err
2525
}
2626

27-
options := &swarmtypes.ConfigReference{
28-
File: &swarmtypes.ConfigReferenceFileTarget{
27+
options := &swarm.ConfigReference{
28+
File: &swarm.ConfigReferenceFileTarget{
2929
UID: "0",
3030
GID: "0",
3131
Mode: 0o444,
@@ -95,6 +95,6 @@ func (o *ConfigOpt) String() string {
9595
}
9696

9797
// Value returns the config requests
98-
func (o *ConfigOpt) Value() []*swarmtypes.ConfigReference {
98+
func (o *ConfigOpt) Value() []*swarm.ConfigReference {
9999
return o.values
100100
}

opts/swarmopts/secret.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"strconv"
99
"strings"
1010

11-
swarmtypes "github.com/docker/docker/api/types/swarm"
11+
"github.com/docker/docker/api/types/swarm"
1212
)
1313

1414
// SecretOpt is a Value type for parsing secrets
1515
type SecretOpt struct {
16-
values []*swarmtypes.SecretReference
16+
values []*swarm.SecretReference
1717
}
1818

1919
// Set a new secret value
@@ -24,8 +24,8 @@ func (o *SecretOpt) Set(value string) error {
2424
return err
2525
}
2626

27-
options := &swarmtypes.SecretReference{
28-
File: &swarmtypes.SecretReferenceFileTarget{
27+
options := &swarm.SecretReference{
28+
File: &swarm.SecretReferenceFileTarget{
2929
UID: "0",
3030
GID: "0",
3131
Mode: 0o444,
@@ -94,6 +94,6 @@ func (o *SecretOpt) String() string {
9494
}
9595

9696
// Value returns the secret requests
97-
func (o *SecretOpt) Value() []*swarmtypes.SecretReference {
97+
func (o *SecretOpt) Value() []*swarm.SecretReference {
9898
return o.values
9999
}

0 commit comments

Comments
 (0)