refactor(prompter): explicit return values
This commit is contained in:
parent
8821f77fbb
commit
9cf341302e
1 changed files with 9 additions and 2 deletions
|
|
@ -156,7 +156,11 @@ func (p *speechSynthesizerFriendlyPrompter) Password(prompt string) (string, err
|
|||
)
|
||||
|
||||
err := form.Run()
|
||||
return result, err
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (p *speechSynthesizerFriendlyPrompter) Confirm(prompt string, defaultValue bool) (bool, error) {
|
||||
|
|
@ -230,7 +234,10 @@ func (p *speechSynthesizerFriendlyPrompter) InputHostname() (string, error) {
|
|||
)
|
||||
|
||||
err := form.Run()
|
||||
return result, err
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func (p *speechSynthesizerFriendlyPrompter) MarkdownEditor(prompt, defaultValue string, blankAllowed bool) (string, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue