aboutsummaryrefslogtreecommitdiffstats
path: root/commands/user_create.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-02-09 01:31:00 +0100
committerGitHub <noreply@github.com>2020-02-09 01:31:00 +0100
commit9e1a987b4d94dc5c2115423ede5954d4faf1d342 (patch)
treee30bb28d55444a7d1e66c8fa8b8ba7d413805473 /commands/user_create.go
parent97bc5ccd229b7b438262a84e3c42783b4d4a82af (diff)
parent9b1aaa032d36e1ac05504916e359f767d1622d9d (diff)
downloadgit-bug-9e1a987b4d94dc5c2115423ede5954d4faf1d342.tar.gz
Merge pull request #294 from MichaelMure/cred-metadata
Cred metadata
Diffstat (limited to 'commands/user_create.go')
-rw-r--r--commands/user_create.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/commands/user_create.go b/commands/user_create.go
index 15b9767e..95e09050 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.PromptDefault("Name", "name", preName, input.Required)
if err != nil {
return err
}
@@ -33,17 +33,17 @@ func runUserCreate(cmd *cobra.Command, args []string) error {
return err
}
- email, err := input.PromptValueRequired("Email", preEmail)
+ email, err := input.PromptDefault("Email", "email", preEmail, input.Required)
if err != nil {
return err
}
- login, err := input.PromptValue("Avatar URL", "")
+ avatarURL, err := input.Prompt("Avatar URL", "avatar")
if err != nil {
return err
}
- id, err := backend.NewIdentityRaw(name, email, "", login, nil)
+ id, err := backend.NewIdentityRaw(name, email, avatarURL, nil)
if err != nil {
return err
}