code: func (k *Kontrol) DeleteKeyPair(id, public string) error {
  	if k.keyPair == nil {
  		return errors.New("Key pair storage is not initialized")
  	}
  
  	var (
  		pair *KeyPair
  		err  error
  	)
  
  	switch {
  	case id == "" && public == "":
  		return errors.New("keypair ID and public key are both empty")
  	case public == "":
  		pair, err = k.keyPair.GetKeyFromID(id)
  	default:
  		pair, err = k.keyPair.GetKeyFromPublic(public)
  	}
  
  	if err != nil {
  		return err
  	}
  
  	err = k.keyPair.DeleteKey(&KeyPair{
  		ID:     pair.ID,
  		Public: pair.Public,
  	})
  
  	if err != nil && err != ErrKeyDeleted {
  		return err
  	}
  
  	deleteIndex := -1
  	for i, p := range k.lastPublic {
  		if p == pair.Public {
  			deleteIndex = i
  			break
  		}
  	}
  
  	if deleteIndex == -1 {
  		return errors.New("deleteKeyPair: public key not found")
  	}
  
  	// delete the given public key
  	//
  	// TODO(rjeczalik): rework to keypairs map[string]*KeyPair
  	k.lastIDs = append(k.lastIDs[:deleteIndex], k.lastIDs[deleteIndex+1:]...)
  	k.lastPublic = append(k.lastPublic[:deleteIndex], k.lastPublic[deleteIndex+1:]...)
  	k.lastPrivate = append(k.lastPrivate[:deleteIndex], k.lastPrivate[deleteIndex+1:]...)
  
  	return nil
  }
docs: // DeleteKeyPair deletes the key with the given id or public key. (One of them
  // can be empty)