summaryrefslogtreecommitdiff
path: root/conf/create.go
diff options
context:
space:
mode:
Diffstat (limited to 'conf/create.go')
-rw-r--r--conf/create.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/conf/create.go b/conf/create.go
index ec732d2..201149a 100644
--- a/conf/create.go
+++ b/conf/create.go
@@ -16,6 +16,7 @@ func hiddenPrompt(prompt string) (string, error) {
if err != nil {
return "", err
}
+ fmt.Println()
return strings.TrimSpace(string(bytes)), nil
}
@@ -30,8 +31,9 @@ var createUser = &Command{
}
username := args[0]
var password string
+ var err error
if len(args) == 1 {
- password, err := hiddenPrompt("Enter password: ")
+ password, err = hiddenPrompt("Enter password: ")
if err != nil { log.Fatal(err) }
confirm, err := hiddenPrompt("Confirm password: ")
if err != nil { log.Fatal(err) }
@@ -43,7 +45,7 @@ var createUser = &Command{
password = args[1]
}
- _, err := p.CreateUser(username, password)
+ _, err = p.CreateUser(username, password)
if err != nil { log.Fatal(err) }
fmt.Printf("created user %v\n", username)
},