From 5b2230a38b357a3e2725fc56be9c07c01fd1203e Mon Sep 17 00:00:00 2001 From: Evan Hazlett Date: Fri, 4 Nov 2016 14:24:44 -0400 Subject: [PATCH] SecretRequestOptions -> SecretRequestOption Signed-off-by: Evan Hazlett --- api/types/client.go | 4 ++-- cli/command/service/parse.go | 2 +- opts/secret.go | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/api/types/client.go b/api/types/client.go index d79ebd9e55..b6a313ac66 100644 --- a/api/types/client.go +++ b/api/types/client.go @@ -341,8 +341,8 @@ type PluginInstallOptions struct { Args []string } -// SecretRequestOptions is a type for requesting secrets -type SecretRequestOptions struct { +// SecretRequestOption is a type for requesting secrets +type SecretRequestOption struct { Source string Target string UID string diff --git a/cli/command/service/parse.go b/cli/command/service/parse.go index 0e3a229f4e..368bc6d449 100644 --- a/cli/command/service/parse.go +++ b/cli/command/service/parse.go @@ -12,7 +12,7 @@ import ( // parseSecrets retrieves the secrets from the requested names and converts // them to secret references to use with the spec -func parseSecrets(client client.APIClient, requestedSecrets []*types.SecretRequestOptions) ([]*swarmtypes.SecretReference, error) { +func parseSecrets(client client.APIClient, requestedSecrets []*types.SecretRequestOption) ([]*swarmtypes.SecretReference, error) { secretRefs := make(map[string]*swarmtypes.SecretReference) ctx := context.Background() diff --git a/opts/secret.go b/opts/secret.go index 9475d9f506..b77a33f685 100644 --- a/opts/secret.go +++ b/opts/secret.go @@ -13,7 +13,7 @@ import ( // SecretOpt is a Value type for parsing secrets type SecretOpt struct { - values []*types.SecretRequestOptions + values []*types.SecretRequestOption } // Set a new secret value @@ -24,7 +24,7 @@ func (o *SecretOpt) Set(value string) error { return err } - options := &types.SecretRequestOptions{ + options := &types.SecretRequestOption{ Source: "", Target: "", UID: "0", @@ -102,6 +102,6 @@ func (o *SecretOpt) String() string { } // Value returns the secret requests -func (o *SecretOpt) Value() []*types.SecretRequestOptions { +func (o *SecretOpt) Value() []*types.SecretRequestOption { return o.values }