feat: better error handling for sys kill signals

This commit is contained in:
Jagadam Dinesh Reddy
2025-07-22 11:55:21 +05:30
committed by GitHub
parent 21ad653b7e
commit 1582b8b2cd
28 changed files with 876 additions and 361 deletions

View File

@@ -17,9 +17,12 @@ var hashCmd = &cobra.Command{
Short: "Hashes a password",
Long: `Hashes a password using bcrypt algorithm.`,
Args: cobra.ExactArgs(1),
Run: func(_ *cobra.Command, args []string) {
RunE: func(_ *cobra.Command, args []string) error {
pwd, err := users.HashPwd(args[0])
checkErr(err)
if err != nil {
return err
}
fmt.Println(pwd)
return nil
},
}