Skip to content

Commit

Permalink
fix: Fix minor issues with promptBool docs and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
twpayne committed Aug 13, 2023
1 parent f0efc5c commit 29e8c30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
@@ -1,9 +1,9 @@
# `promptBool` *prompt* [*default*]

`promptBool` prompts the user with *prompt* and returns the user's response
interpreted as a boolean. If *default* is passed the user's response is empty
then it returns *default*. The user's response is interpreted as follows (case
insensitive):
interpreted as a boolean. If *default* is passed and the user's response is
empty then it returns *default*. The user's response is interpreted as follows
(case insensitive):

| Response | Result |
| ----------------------- | ------- |
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/interactivetemplatefuncs.go
Expand Up @@ -77,7 +77,7 @@ func (c *Config) promptBoolOnceInteractiveTemplateFunc(
args ...bool,
) bool {
if len(args) > 1 {
err := fmt.Errorf("want 2 or 3 arguments, got %d", len(args)+2)
err := fmt.Errorf("want 3 or 4 arguments, got %d", len(args)+2)
panic(err)
}

Expand Down

0 comments on commit 29e8c30

Please sign in to comment.