code: func SetPassword(file, name, password string, hashAlgorithm HashAlgorithm) error {
  	_, err := os.Stat(file)
  	passwords := HashedPasswords(map[string]string{})
  	if err == nil {
  		passwords, err = ParseHtpasswdFile(file)
  		if err != nil {
  			return err
  		}
  	}
  	err = passwords.SetPassword(name, password, hashAlgorithm)
  	if err != nil {
  		return err
  	}
  	return passwords.WriteToFile(file)
  }
docs: // SetPassword set password for a user with a given hashing algorithm