code: func (store *store) Delete(ref reference.Named) (bool, error) {
  	ref, err := favorDigest(ref)
  	if err != nil {
  		return false, err
  	}
  
  	ref = reference.TagNameOnly(ref)
  
  	refName := reference.FamiliarName(ref)
  	refStr := reference.FamiliarString(ref)
  
  	store.mu.Lock()
  	defer store.mu.Unlock()
  
  	repository, exists := store.Repositories[refName]
  	if !exists {
  		return false, ErrDoesNotExist
  	}
  
  	if id, exists := repository[refStr]; exists {
  		delete(repository, refStr)
  		if len(repository) == 0 {
  			delete(store.Repositories, refName)
  		}
  		if store.referencesByIDCache[id] != nil {
  			delete(store.referencesByIDCache[id], refStr)
  			if len(store.referencesByIDCache[id]) == 0 {
  				delete(store.referencesByIDCache, id)
  			}
  		}
  		return true, store.save()
  	}
  
  	return false, ErrDoesNotExist
  }
docs: // Delete deletes a reference from the store. It returns true if a deletion
  // happened, or false otherwise.