Skip to content

Commit

Permalink
add PromptForConfirmYes default description" (#1134)
Browse files Browse the repository at this point in the history
* add default description

* add default description

* add default description

* add default description

* add PromptForConfirmYes  default Y description

Co-authored-by: wangbin <wangbin@cmss.chinamobile.com>
Co-authored-by: Ti Chi Robot <71242396+ti-chi-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Feb 9, 2021
1 parent 6cf73b3 commit 97cd5cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/cliutil/tui.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func PromptForConfirmYes(format string, a ...interface{}) (bool, string) {
// PromptForConfirmNo accepts yes / no from console by user, default to Yes and only return true
// if the user input is No
func PromptForConfirmNo(format string, a ...interface{}) (bool, string) {
ans := Prompt(fmt.Sprintf(format, a...))
ans := Prompt(fmt.Sprintf(format, a...)+"(default=Y)")
switch strings.TrimSpace(strings.ToLower(ans)) {
case "n", "no":
return true, ans
Expand Down

0 comments on commit 97cd5cb

Please sign in to comment.