// DeleteTag deletes an existing tag.
975466
func (c *Manager) DeleteTag(ctx context.Context, tag *Tag) error {
	url := internal.URL(c, internal.TagPath).WithID(tag.ID)
	return c.Do(ctx, url.Request(http.MethodDelete), nil)
}
836367
func Tag(c context.Context, v string) context.Context {
	return context.WithValue(c, &clockTagKey, append(Tags(c), v))
}
673825
func escapeTag(tag reflect.StructTag) string {
	t := string(tag)
	if strings.ContainsRune(t, '`') {
		// there are ` in the string; we can't use ` to enclose the string
		return strconv.Quote(t)
	}
	return "`" + t + "`"
}
1297933
func (r *Repository) DeleteTag(name string) error {
	_, err := r.Tag(name)
	if err != nil {
		return err
	}

	return r.Storer.RemoveReference(plumbing.ReferenceName(path.Join("refs", "tags", name)))
}
773963
func (c *Charm) Tag() names.Tag {
	return names.NewCharmTag(c.URL().String())
}
1068516
func (s *Sentry) Untag(key string) {
	s.Lock()
	delete(s.client.Tags, key)
	s.Unlock()
}
752788
func (a *Client) DeleteNodesIdentifierTagsTagname(params *DeleteNodesIdentifierTagsTagnameParams, authInfo runtime.ClientAuthInfoWriter) (*DeleteNodesIdentifierTagsTagnameOK, error) {
	// TODO: Validate the params before sending
	if params == nil {
		params = NewDeleteNodesIdentifierTagsTagnameParams()
	}

	result, err := a.transport.Submit(&runtime.ClientOperation{
		ID:                 "DeleteNodesIdentifierTagsTagname",
		Method:             "DELETE",
		PathPattern:        "/nodes/{identifier}/tags/{tagname}",
		ProducesMediaTypes: []string{"application/json", "application/x-gzip"},
		ConsumesMediaTypes: []string{"application/json"},
		Schemes:            []string{"http", "https"},
		Params:             params,
		Reader:             &DeleteNodesIdentifierTagsTagnameReader{formats: a.formats},
		AuthInfo:           authInfo,
	})
	if err != nil {
		return nil, err
	}
	return result.(*DeleteNodesIdentifierTagsTagnameOK), nil
}
63314
func (pt *PerceptronTagger) Tag(words []string) []Token {
	var tokens []Token
	var clean []string
	var tag string
	var found bool

	p1, p2 := "-START-", "-START2-"
	context := []string{p1, p2}
	for _, w := range words {
		if w == "" {
			continue
		}
		context = append(context, normalize(w))
		clean = append(clean, w)
	}
	context = append(context, []string{"-END-", "-END2-"}...)
	for i, word := range clean {
		if none.MatchString(word) {
			tag = "-NONE-"
		} else if keep.MatchString(word) {
			tag = word
		} else if tag, found = pt.model.tagMap[word]; !found {
			tag = pt.model.predict(featurize(i, context, word, p1, p2))
		}
		tokens = append(tokens, Token{Tag: tag, Text: word})
		p2 = p1
		p1 = tag
	}

	return tokens
}
1251466
func JavascriptTag(opts Options) *Tag {
	if opts["src"] != nil {
		delete(opts, "body")
	}

	return New("script", opts)
}
109401
func (s *DjangoEngine) RegisterTag(tagName string, parserFn TagParser) error {
	fn := func(doc *pongo2.Parser, start *pongo2.Token, arguments *pongo2.Parser) (pongo2.INodeTag, *pongo2.Error) {
		t, err := parserFn((*Parser)(doc), (*Token)(start), (*Parser)(arguments))
		return t, (*pongo2.Error)(err)
	}

	return pongo2.RegisterTag(tagName, fn)
}
1112030
func (f *Field) Tag(key string) string {
	return f.field.Tag.Get(key)
}
566920
func DecodeTag(s storer.EncodedObjectStorer, o plumbing.EncodedObject) (*Tag, error) {
	t := &Tag{s: s}
	if err := t.Decode(o); err != nil {
		return nil, err
	}

	return t, nil
}
361614
func (s *MetricsFilter) SetTag(v *Tag) *MetricsFilter {
	s.Tag = v
	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
}
412772
func (s *TaggedResource) SetTag(v *Tag) *TaggedResource {
	s.Tag = v
	return s
}
70068
func (logger *Logger) SetTag(tag ...string) {
	goID := logger.curGoroutineID()
	var t string
	if len(tag) > 0 {
		t = tag[0]
	} else {
		id, err := uuid.NewV4()
		if err != nil {
			panic(fmt.Errorf("error generating uuid: " + err.Error()))
		}
		t = id.String()[0:8]
	}
	logger.tagMap.Store(goID, t)
}
605477
func (p *propTags) RemoveTag(target string) {
	if !p.HasTag(target) {
		return
	}
	res := []string{}
	for _, tag := range p.Tags {
		if tag != target {
			res = append(res, tag)
		}
	}

	p.Tags = res
}