// TagName returns the tag name for the tag.
496751
func TagName(tag int) string {
	if (tag & TinyStrTagMask) == TinyStrTag {
		return "String"
	}
	switch tag {
	case NullTag:
		return "Null"
	case BoolTag:
		return "Bool"
	case Int8Tag:
		return "Int8"
	case Int16Tag:
		return "Int16"
	case Int32Tag:
		return "Int32"
	case Int64Tag:
		return "Int64"
	case Float32Tag:
		return "Float32"
	case Float64Tag:
		return "Float64"
	case BytesTag:
		return "Bytes"
	case StringTag:
		return "String"
	case TimestampTag:
		return "Timestamp"
	case SymbolTag:
		return "Symbol"
	case UUIDTag:
		return "UUID"
	case ArrayTag:
		return "Array"
	case MapTag:
		return "Map"
	case StructTag:
		return "Struct"
	case AnyTag:
		return "Any"
	case EnumTag:
		return "Enum"
	default:
		return fmt.Sprintf("0x%02x", tag)
	}
}
383845
func (z *Tokenizer) readTagName() {
	z.data.start = z.raw.end - 1
	for {
		c := z.readByte()
		if z.err != nil {
			z.data.end = z.raw.end
			return
		}
		switch c {
		case ' ', '\n', '\r', '\t', '\f':
			z.data.end = z.raw.end - 1
			return
		case '/', '>':
			z.raw.end--
			z.data.end = z.raw.end
			return
		}
	}
}
734732
func (s *TagFilter) SetTag(v string) *TagFilter {
	s.Tag = &v
	return s
}
1219525
func (ag *Aggregator) HTMLName() template.HTML {
	ag.mu.Lock()
	defer ag.mu.Unlock()
	result := make([]string, 0, len(ag.reporters))
	for _, rep := range ag.reporters {
		result = append(result, string(rep.HTMLName()))
	}
	sort.Strings(result)
	return template.HTML(strings.Join(result, "&nbsp; + &nbsp;"))
}
552393
func RegisterTag(name string, parserFn TagParser) error {
	_, existing := tags[name]
	if existing {
		return errors.Errorf("tag with name '%s' is already registered", name)
	}
	tags[name] = &tag{
		name:   name,
		parser: parserFn,
	}
	return nil
}
412772
func (s *TaggedResource) SetTag(v *Tag) *TaggedResource {
	s.Tag = v
	return s
}
811394
func (n *TagOverrideNamer) Name(t *types.Type) string {
	if nameOverride := extractTag(n.tagName, append(t.SecondClosestCommentLines, t.CommentLines...)); nameOverride != "" {
		return nameOverride
	}

	return n.fallback.Name(t)
}
509637
func (e Error) Tag(tag Error) Error {
	return Error(string(tag) + ":" + string(e))
}
827590
func NewTagMatcher(name string, value string) TagMatcher {
	return &tagMatcher{tag: StringTag(name, value)}
}
1292363
func (tn *tagNode) appendTagNode(tag string) (*tagNode, error) {
	ntn, err := newTagNode(tag)
	if err != nil {
		return nil, err
	}
	tn.appendChild(ntn)
	return ntn, nil
}
534611
func (t *PEP425Tag) TagString() string {
	return strings.Join([]string{t.Python, t.Abi, t.Platform}, "-")
}
1219272
func (i *Image) TagLayerID(tagName string) (string, error) {
	layerID, ok := i.tags[tagName]
	if !ok {
		return "", fmt.Errorf("can't find tag '%s' for image '%s'", tagName, i.Name)
	}

	return layerID, nil
}
840381
func (client *Client) TagDelete(project_id, name string, params *TagDeleteParams) error {

	err := func() error {

		url := fmt.Sprintf("/v2/projects/%s/tags/%s", url.QueryEscape(project_id), url.QueryEscape(name))

		paramsBuf := bytes.NewBuffer(nil)
		err := json.NewEncoder(paramsBuf).Encode(&params)
		if err != nil {
			return err
		}

		rc, err := client.sendRequest("DELETE", url, "application/json", paramsBuf, 204)
		if err != nil {
			return err
		}
		defer rc.Close()

		return nil
	}()
	return err
}
655981
func (b *block) Tag() (names.Tag, error) {
	tag, err := names.ParseTag(b.doc.Tag)
	if err != nil {
		return nil, errors.Annotatef(err, "getting block information")
	}
	return tag, nil
}
939692
func (m *MockConfig) Tag() names_v2.Tag {
	ret := m.ctrl.Call(m, "Tag")
	ret0, _ := ret[0].(names_v2.Tag)
	return ret0
}
1075796
func parseNameTag(tag, defaultName string) (string, string, error) {
	fullNameTag := ""
	name := defaultName

	matches := namePattern0.FindStringSubmatch(tag)
	if len(matches) == 2 {
		fullNameTag = matches[0]
		name = matches[1]
	}

	// filter out "trailing comma"
	name = strings.TrimRight(name, " ,")

	var err error
	name, err = NormalizeName(name)
	if err != nil {
		return "", "", err
	}

	return fullNameTag, name, nil
}
1221149
func (g *Group) Tag(items map[string]string) *Statement {
	// notest
	// don't think this can ever be used in valid code?
	s := Tag(items)
	g.items = append(g.items, s)
	return s
}