mirror of
https://github.com/docker/cli.git
synced 2026-11-01 23:35:23 +03:00
opts/swarmopts: fix prealloc linting
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
@@ -86,7 +86,7 @@ func (*ConfigOpt) Type() string {
|
||||
|
||||
// String returns a string repr of this option
|
||||
func (o *ConfigOpt) String() string {
|
||||
configs := []string{}
|
||||
configs := make([]string, 0, len(o.values))
|
||||
for _, config := range o.values {
|
||||
repr := fmt.Sprintf("%s -> %s", config.ConfigName, config.File.Name)
|
||||
configs = append(configs, repr)
|
||||
|
||||
@@ -85,7 +85,7 @@ func (*SecretOpt) Type() string {
|
||||
|
||||
// String returns a string repr of this option
|
||||
func (o *SecretOpt) String() string {
|
||||
secrets := []string{}
|
||||
secrets := make([]string, 0, len(o.values))
|
||||
for _, secret := range o.values {
|
||||
repr := fmt.Sprintf("%s -> %s", secret.SecretName, secret.File.Name)
|
||||
secrets = append(secrets, repr)
|
||||
|
||||
Reference in New Issue
Block a user