summaryrefslogtreecommitdiff
path: root/conf/create.go
diff options
context:
space:
mode:
authorsanine-a <sanine.not@pm.me>2023-05-10 15:17:18 -0500
committersanine-a <sanine.not@pm.me>2023-05-10 15:17:18 -0500
commit609ef3f3b4d4cb355d80b19df1e91db258b0bbe0 (patch)
treef5681d28f031241717b72daf117b82d954e9117e /conf/create.go
parent2aac43407d7b2699d956b7c626da4f45c802c53c (diff)
log out after 1 hour of inactivity
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)
},