Skip to content

Commit

Permalink
fix-up-ineffectual-assignment
Browse files Browse the repository at this point in the history
  • Loading branch information
tanjunchen committed Sep 29, 2019
1 parent 8087994 commit 9e10230
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions util/pkg/ui/user.go
Expand Up @@ -49,7 +49,7 @@ func GetConfirm(c *ConfirmArgs) (bool, error) {

for {
answerTemplate := " (%s/%s)"
message := c.Message
var message string
switch c.Default {
case "yes", "y":
message = c.Message + fmt.Sprintf(answerTemplate, "Y", "n")
Expand All @@ -59,7 +59,6 @@ func GetConfirm(c *ConfirmArgs) (bool, error) {
message = c.Message + fmt.Sprintf(answerTemplate, "y", "n")
}
fmt.Fprintln(c.Out, message)

// these are the acceptable answers
okayResponses := sets.NewString("y", "yes")
nokayResponses := sets.NewString("n", "no")
Expand Down

0 comments on commit 9e10230

Please sign in to comment.