Skip to content

Commit

Permalink
Workaround StringArray bug in Viper
Browse files Browse the repository at this point in the history
Switching from StringArray to StringSlice to workaround
spf13/viper#398.
  • Loading branch information
carolynvs-msft committed Jan 26, 2018
1 parent d299a7b commit d90245b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions cmd/svcat/binding/bind_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,9 @@ func NewBindCmd(cxt *command.Context) *cobra.Command {
"",
"The name of the secret. Defaults to the name of the instance.",
)
cmd.Flags().StringArrayVarP(&bindCmd.rawParams, "param", "p", nil,
cmd.Flags().StringSliceVarP(&bindCmd.rawParams, "param", "p", nil,
"Additional parameter to use when binding the instance, format: NAME=VALUE")
cmd.Flags().StringArrayVarP(&bindCmd.rawSecrets, "secret", "s", nil,
cmd.Flags().StringSliceVarP(&bindCmd.rawSecrets, "secret", "s", nil,
"Additional parameter, whose value is stored in a secret, to use when binding the instance, format: SECRET[KEY]")

return cmd
Expand Down
4 changes: 2 additions & 2 deletions cmd/svcat/instance/provision_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ func NewProvisionCmd(cxt *command.Context) *cobra.Command {
cmd.Flags().StringVar(&provisionCmd.planName, "plan", "",
"The plan name (Required)")
cmd.MarkFlagRequired("plan")
cmd.Flags().StringArrayVarP(&provisionCmd.rawParams, "param", "p", nil,
cmd.Flags().StringSliceVarP(&provisionCmd.rawParams, "param", "p", nil,
"Additional parameter to use when provisioning the service, format: NAME=VALUE")
cmd.Flags().StringArrayVarP(&provisionCmd.rawSecrets, "secret", "s", nil,
cmd.Flags().StringSliceVarP(&provisionCmd.rawSecrets, "secret", "s", nil,
"Additional parameter, whose value is stored in a secret, to use when provisioning the service, format: SECRET[KEY]")
return cmd
}
Expand Down

0 comments on commit d90245b

Please sign in to comment.