code: func main() {
  	// Read args
  	args := os.Args
  	if len(args) != 3 {
  		usage()
  		return
  	}
  
  	pass := args[1]
  	cost, err := strconv.Atoi(args[2])
  	if err != nil {
  		logrus.DefaultLogger().Errorf("invalid cost format: %v", err)
  		os.Exit(1)
  	}
  	if cost < 4 || cost > 31 {
  		logrus.DefaultLogger().Errorf("invalid cost value %d, set it in interval 4-31", cost)
  		os.Exit(1)
  	}
  	hash, err := bcrypt.GenerateFromPassword([]byte(pass), cost)
  	if err != nil {
  		logrus.DefaultLogger().Errorf("failed to hash password: %v", err)
  		os.Exit(1)
  	}
  
  	logrus.DefaultLogger().Print(string(hash))
  }
docs: // A simple utility to help with password hashing. Hashed password can be stored as
  // user password in config file. Always provide two parameters; password and cost.