code: func (c *Credentials) isValid() (bool, error) {
  	if len(c.ServerURL) == 0 {
  		return false, NewErrCredentialsMissingServerURL()
  	}
  
  	if len(c.Username) == 0 {
  		return false, NewErrCredentialsMissingUsername()
  	}
  
  	return true, nil
  }
docs: // isValid checks the integrity of Credentials object such that no credentials lack
  // a server URL or a username.
  // It returns whether the credentials are valid and the error if it isn't.
  // error values can be errCredentialsMissingServerURL or errCredentialsMissingUsername