-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from auth0/feature/delete-confirmation
[A0CLI-33] feat: add confirmation before delete action
- Loading branch information
Showing
74 changed files
with
12,295 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
package prompt | ||
|
||
import ( | ||
"github.com/AlecAivazis/survey/v2" | ||
) | ||
|
||
func Ask(inputs []*survey.Question, response interface{}, options ...survey.AskOpt) error { | ||
return survey.Ask(inputs, response, options...) | ||
} | ||
|
||
func TextInput(name string, message string, required bool) *survey.Question { | ||
input := &survey.Question{ | ||
Name: name, | ||
Prompt: &survey.Input{Message: message}, | ||
Transform: survey.Title, | ||
} | ||
|
||
if required { | ||
input.Validate = survey.Required | ||
} | ||
|
||
return input | ||
} | ||
|
||
func Confirm(message string) bool { | ||
result := false | ||
prompt := &survey.Confirm{ | ||
Message: message, | ||
} | ||
|
||
if err := survey.AskOne(prompt, &result); err != nil { | ||
return false | ||
} | ||
|
||
return result | ||
} |
22 changes: 22 additions & 0 deletions
22
vendor/github.com/AlecAivazis/survey/v2/.travis.yml
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
77 changes: 77 additions & 0 deletions
77
vendor/github.com/AlecAivazis/survey/v2/CONTRIBUTING.md
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
78 changes: 78 additions & 0 deletions
78
vendor/github.com/AlecAivazis/survey/v2/Gopkg.lock
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.