code: func (store *store) AddTag(ref reference.Named, id digest.Digest, force bool) error {
  	if _, isCanonical := ref.(reference.Canonical); isCanonical {
  		return errors.WithStack(invalidTagError("refusing to create a tag with a digest reference"))
  	}
  	return store.addReference(reference.TagNameOnly(ref), id, force)
  }
docs: // AddTag adds a tag reference to the store. If force is set to true, existing
  // references can be overwritten. This only works for tags, not digests.