From 47bb30ce89584b6548d23ccfa4c17118d941e9e8 Mon Sep 17 00:00:00 2001 From: Rita Zerrizuela Date: Fri, 12 Mar 2021 00:01:51 -0300 Subject: [PATCH] Remove IsInteractive --- internal/cli/apps.go | 3 --- internal/cli/flags.go | 3 +-- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/internal/cli/apps.go b/internal/cli/apps.go index 25ddb0a0a..50c8834a4 100644 --- a/internal/cli/apps.go +++ b/internal/cli/apps.go @@ -25,7 +25,6 @@ var ( DefaultValue: "", Help: "Name of the application.", IsRequired: true, - IsInteractive: true, } appDescription = Flag{ Name: "Description", @@ -34,7 +33,6 @@ var ( DefaultValue: "", Help: "Description of the application. Max character count is 140.", IsRequired: false, - IsInteractive: true, } appAuthMethod = Flag{ Name: "Auth Method", @@ -43,7 +41,6 @@ var ( DefaultValue: "", Help: "Defines the requested authentication method for the token endpoint. Possible values are 'None' (public application without a client secret), 'Post' (application uses HTTP POST parameters) or 'Basic' (application uses HTTP Basic).", IsRequired: false, - IsInteractive: false, } ) diff --git a/internal/cli/flags.go b/internal/cli/flags.go index 6d5e2d90c..f8ac5fe68 100644 --- a/internal/cli/flags.go +++ b/internal/cli/flags.go @@ -14,7 +14,6 @@ type Flag struct { DefaultValue string Help string IsRequired bool - IsInteractive bool } func (f *Flag) Ask(cmd *cobra.Command, value interface{}) error { @@ -38,7 +37,7 @@ func ask(cmd *cobra.Command, f *Flag, value interface{}, isUpdate bool) error { shouldAsk = shouldPrompt(cmd, f.LongForm) } - if f.IsInteractive && shouldAsk { + if shouldAsk { input := prompt.TextInput("", fmt.Sprintf("%s:", f.Name), f.Help, f.IsRequired) if err := prompt.AskOne(input, value); err != nil {