// CheckRegistrationKey checks whether provided key is present in registration database and deletes it,
// preventing another registration with the same key.
// Returns true if key was present (registration allowed), false otherwise.
CheckRegistrationKey checks whether provided key is present in registration database and deletes it,
preventing another registration with the same key.
Returns true if key was present (registration allowed), false otherwise.
// CheckRegistrationKey checks whether provided key is present in registration database and deletes it // preventing another registration with the same key . // Returns true if key was present ( registration allowed ) false otherwise .
func (rm *RegistrationManager) CheckRegistrationKey(key string) (bool, error) {
	resp := rm.Del(key)
	err := resp.Err()
	if err != nil {
		return false, err
	}
	return resp.Val() == 1, nil 
}
func ( rm * RegistrationManager ) CheckRegistrationKey ( key string ) ( bool , error ) { resp := rm . Del ( key ) err := resp . Err ( ) if err != nil { return false , err } return resp . Val ( ) == 1 , nil }
CheckRegistrationKey checks whether provided key is present in registration database and deletes it,
preventing another registration with the same key.
CheckRegistrationKey checks whether provided key is present in registration database and deletes it preventing another registration with the same key .
// one deleted entry indicates that the key was present in the DB