Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

// VerifyPassword checks if password is valid and upgrades it if its encrypting scheme was outdated // Returns isValid, wasUpdated, error

func (a *Account) VerifyPassword(password string) (bool, bool, error) {

this is why we need sum types people



or just named return values

  func (a *Account) VerifyPassword(password string) (isValid, wasUpdated bool, err error) {




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: