diff options
author | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-26 08:40:41 +0200 |
---|---|---|
committer | Quentin Dufour <quentin@deuxfleurs.fr> | 2023-09-26 08:40:41 +0200 |
commit | 706ff58a6f6608719feda15075d50f978df39c5b (patch) | |
tree | d0b655454d5e13ed2238060fee27fc0d951d64c8 /cli.go | |
parent | d8633d7fb89b55996f25e1a67180408c805ba15f (diff) | |
download | guichet-706ff58a6f6608719feda15075d50f978df39c5b.tar.gz guichet-706ff58a6f6608719feda15075d50f978df39c5b.zip |
format
Diffstat (limited to 'cli.go')
-rw-r--r-- | cli.go | 20 |
1 files changed, 10 insertions, 10 deletions
@@ -3,9 +3,9 @@ package main import ( "flag" "fmt" - "os" - "syscall" "golang.org/x/term" + "os" + "syscall" ) var fsCli = flag.NewFlagSet("cli", flag.ContinueOnError) @@ -27,18 +27,18 @@ func cliMain(args []string) { func cliPasswd() { fmt.Print("Password: ") - bytepw, err := term.ReadPassword(int(syscall.Stdin)) - if err != nil { + bytepw, err := term.ReadPassword(int(syscall.Stdin)) + if err != nil { fmt.Println(err) - os.Exit(1) - } - pass := string(bytepw) + os.Exit(1) + } + pass := string(bytepw) hash, err := SSHAEncode(pass) - if err != nil { + if err != nil { fmt.Println(err) - os.Exit(1) - } + os.Exit(1) + } fmt.Println(hash) } |