Skip to content

Commit

Permalink
fix: user friendly error
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol authored Feb 2, 2022
1 parent 3164c4a commit 2aeaedc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cmd/hasher/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ func main() {
hashed, err := bcrypt.GenerateFromPassword([]byte(plainText), bcrypt.DefaultCost)

if err != nil {
panic(err)
fmt.Fprintln(os.Stderr, "failed to generate password hash")
os.Exit(1)
}

fmt.Println(string(hashed))
Expand Down

0 comments on commit 2aeaedc

Please sign in to comment.