// BanTag bans a specific tag for this template set. See more in the documentation for TemplateSet.
960915
func (set *TemplateSet) BanTag(name string) error {
	_, has := tags[name]
	if !has {
		return errors.Errorf("tag '%s' not found", name)
	}
	if set.firstTemplateCreated {
		return errors.New("you cannot ban any tags after you've added your first template to your template set")
	}
	_, has = set.bannedTags[name]
	if has {
		return errors.Errorf("tag '%s' is already banned", name)
	}
	set.bannedTags[name] = true

	return nil
}
664766
func (s *ReplicationRuleFilter) SetTag(v *Tag) *ReplicationRuleFilter {
	s.Tag = v
	return s
}
159404
func parseTag(f reflect.StructField, tag string) (string, options) {
	return splitTags(getTagValues(f, tag))
}
421877
func (f FormFor) InputTag(field string, opts tags.Options) *tags.Tag {
	f.buildOptions(field, opts)
	f.addFormatTag(field, opts)
	return f.Form.InputTag(opts)
}
942065
func ValidateTag(k, v string) error {
	if err := StreamName(k).Validate(); err != nil {
		return fmt.Errorf("invalid tag key: %s", err)
	}
	if len(k) > MaxTagKeySize {
		return fmt.Errorf("tag key exceeds maximum size (%d > %d)", len(k), MaxTagKeySize)
	}
	if len(v) > MaxTagValueSize {
		return fmt.Errorf("tag value exceeds maximum size (%d > %d)", len(v), MaxTagValueSize)
	}
	return nil
}
286738
func (tf *TemplateFunctions) HasTag(tag string) bool {
	_, found := tf.tags[tag]
	return found
}
318439
func (entry *Entry) GetTag() (Tag, error) {
	var t C.acl_tag_t
	rv, _ := C.acl_get_tag_type(entry.e, &t)
	if rv < 0 {
		return TagUndefined, fmt.Errorf("unable to get tag")
	}
	return Tag(t), nil
}
775847
func (mv *Validator) parseTags(t string) ([]tag, error) {
	tl := strings.Split(t, ",")
	tags := make([]tag, 0, len(tl))
	for _, i := range tl {
		tg := tag{}
		v := strings.SplitN(i, "=", 2)
		tg.Name = strings.Trim(v[0], " ")
		if tg.Name == "" {
			return []tag{}, ErrUnknownTag
		}
		if len(v) > 1 {
			tg.Param = strings.Trim(v[1], " ")
		}
		var found bool
		if tg.Fn, found = mv.validationFuncs[tg.Name]; !found {
			return []tag{}, ErrUnknownTag
		}
		tags = append(tags, tg)

	}
	return tags, nil
}
761492
func SpecHasTag(stream *imagev1.ImageStream, name string) (imagev1.TagReference, bool) {
	for _, tag := range stream.Spec.Tags {
		if tag.Name == name {
			return tag, true
		}
	}
	return imagev1.TagReference{}, false
}
16177
func (c *GitHubClient) DeleteTag(ctx context.Context, tag string) error {
	ref := fmt.Sprintf("tags/%s", tag)
	res, err := c.Git.DeleteRef(context.TODO(), c.Owner, c.Repo, ref)
	if err != nil {
		return errors.Wrapf(err, "failed to delete tag: %s", ref)
	}

	if res.StatusCode != http.StatusNoContent {
		return errors.Errorf("delete tag: invalid status: %s", res.Status)
	}

	return nil
}
412772
func (s *TaggedResource) SetTag(v *Tag) *TaggedResource {
	s.Tag = v
	return s
}
829732
func (s *Statement) Tag(items map[string]string) *Statement {
	c := tag{
		items: items,
	}
	*s = append(*s, c)
	return s
}
820447
func ValidateTag(tag string) ([]string, error) {
	ltag := strings.ToLower(tag)
	if !validTagRe.MatchString(ltag) {
		return nil, fmt.Errorf("invalid tag: %q", tag)
	}
	ltags := strings.Split(ltag, ":")
	return ltags, nil
}
761036
func (f FormFor) InputTag(field string, opts tags.Options) *tags.Tag {
	opts = f.buildOptions(field, opts)
	if opts["type"] == "hidden" {
		return f.HiddenTag(field, opts)
	}

	return divWrapper(opts, func(o tags.Options) tags.Body {
		return f.FormFor.InputTag(field, opts)
	})
}
889626
func (r *PURuntime) Tag(key string) (string, bool) {
	r.Lock()
	defer r.Unlock()

	tag, ok := r.tags.Get(key)
	return tag, ok
}
93532
func (s *LifecycleRuleFilter) SetTag(v *Tag) *LifecycleRuleFilter {
	s.Tag = v
	return s
}
1044172
func (f *Field) RemoveTag(tag string) FieldInterface {
	delete(f.tag, tag)
	return f
}