diff options
author | Michael Muré <batolettre@gmail.com> | 2020-01-07 22:06:42 +0100 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2020-02-08 17:18:27 +0100 |
commit | db893494bb1492a3d9e32787a5ada1dd8f639ef3 (patch) | |
tree | ca956e6f2024d82a7600faca6d584cc3406593f0 /commands/user_create.go | |
parent | 97bc5ccd229b7b438262a84e3c42783b4d4a82af (diff) | |
download | git-bug-db893494bb1492a3d9e32787a5ada1dd8f639ef3.tar.gz |
input: better reusable prompt functions
Diffstat (limited to 'commands/user_create.go')
-rw-r--r-- | commands/user_create.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/commands/user_create.go b/commands/user_create.go index 15b9767e..dab8a879 100644 --- a/commands/user_create.go +++ b/commands/user_create.go @@ -23,7 +23,7 @@ func runUserCreate(cmd *cobra.Command, args []string) error { return err } - name, err := input.PromptValueRequired("Name", preName) + name, err := input.Prompt("Name", "name", preName, input.Required) if err != nil { return err } @@ -33,12 +33,12 @@ func runUserCreate(cmd *cobra.Command, args []string) error { return err } - email, err := input.PromptValueRequired("Email", preEmail) + email, err := input.Prompt("Email", "email", preEmail, input.Required) if err != nil { return err } - login, err := input.PromptValue("Avatar URL", "") + login, err := input.Prompt("Avatar URL", "avatar", "") if err != nil { return err } |