// readTag reads the tag of a node. It als returns the class of the next rune.
779340
func (mr *mlReader) readTag() (string, int, error) {
	var buf bytes.Buffer
	for {
		r, rc, err := mr.readRune()
		switch {
		case err != nil:
			return "", 0, err
		case rc == rcEOF:
			return "", 0, errors.New(ErrReader, errorMessages, "unexpected end of file while reading a tag")
		case rc == rcTag:
			buf.WriteRune(r)
		case rc == rcSpace || rc == rcClose:
			return buf.String(), rc, nil
		default:
			msg := fmt.Sprintf("invalid tag character at position %d", mr.index)
			return "", 0, errors.New(ErrReader, errorMessages, msg)
		}
	}
}
553398
func (logger *Logger) GetTag() string {
	goID := logger.curGoroutineID()
	if tagVal, found := logger.tagMap.Load(goID); !found {
		return ""
	} else if tag, ok := tagVal.(string); ok {
		return tag
	}
	panic(fmt.Errorf("cannot cast log tag from map to string"))
}
1251162
func (c IndexEntries) StringByTag(tag int) string {
	s := c.StringsByTag(tag)
	if s == nil || len(s) == 0 {
		return ""
	}
	return s[0]
}
642870
func (f *FieldSetType) AddTag(tag string) *FieldSetType {
	f.tags[tag] = struct{}{}
	return f
}
302131
func (o *GetTagsReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
	switch response.Code() {

	case 200:
		result := NewGetTagsOK()
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return result, nil

	default:
		result := NewGetTagsDefault(response.Code())
		if err := result.readResponse(response, consumer, o.formats); err != nil {
			return nil, err
		}
		return nil, result
	}
}
626736
func (mr *mlReader) readTagChildren() error {
	for {
		_, rc, err := mr.readRune()
		switch {
		case err != nil:
			return err
		case rc == rcEOF:
			return errors.New(ErrReader, errorMessages, "unexpected end of file while reading children")
		case rc == rcClose:
			return nil
		case rc == rcOpen:
			if err = mr.readBracedContent(); err != nil {
				return err
			}
		default:
			mr.index--
			mr.reader.UnreadRune()
			if err = mr.readTextNode(); err != nil {
				return err
			}
		}
	}
}
1112030
func (f *Field) Tag(key string) string {
	return f.field.Tag.Get(key)
}
1004904
func (c *agentConf) ReadConfig(tag string) error {
	t, err := names.ParseTag(tag)
	if err != nil {
		return errors.Trace(err)
	}
	c.mu.Lock()
	defer c.mu.Unlock()
	conf, err := agent.ReadConfig(agent.ConfigPath(c.dataDir, t))
	if err != nil {
		return errors.Trace(err)
	}
	c._config = conf
	return nil
}
908174
func (t *table) readTags(tags models.Tags) {
	for j := range t.tags {
		t.tags[j] = t.defs[j]
	}

	if len(tags) == 0 {
		return
	}

	for _, tag := range tags {
		j := execute.ColIdx(string(tag.Key), t.cols)
		t.tags[j] = tag.Value
	}
}
1078298
func unexpectedTag(tag byte, expectTags []byte) {
	if tag == 0 {
		panic(errors.New("No byte found in stream"))
	} else if expectTags == nil {
		panic(errors.New("Unexpected serialize tag '" + string(rune(tag)) + "' in stream"))
	} else {
		panic(errors.New("Tag '" + string(expectTags) + "' expected, but '" + string(rune(tag)) + "' found in stream"))
	}
}
91362
func (r *Reader) ReadTimeWithoutTag() (t time.Time) {
	hour := r.read2Digit()
	min := r.read2Digit()
	sec := r.read2Digit()
	tag := r.readByte()
	var nsec int
	if tag == TagPoint {
		nsec, tag = r.readNsec()
	}
	var loc *time.Location
	if tag == TagUTC {
		loc = time.UTC
	} else {
		loc = time.Local
	}
	t = time.Date(1970, 1, 1, hour, min, sec, nsec, loc)
	if !r.Simple {
		setReaderRef(r, &t)
	}
	return
}
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
}
420539
func (w *xmlWriter) OpenTag(tag []string) error {
	w.context.Writef("<%s", tag[0])
	if len(tag) > 1 {
		w.context.Writef(" id=%q", tag[1])
	}
	if len(tag) > 2 {
		w.context.Writef(" class=%q", tag[2])
	}
	return w.context.Writef(">")
}
115396
func (th TagHeader) ReadFlags() Flags {
	flags := Flags{}
	flags.Unsynchronisation = (th[5] & (1 << 0)) != 0     // 3.1.a
	flags.ExtendedHeader = (th[5] & (1 << 1)) != 0        // 3.1.b
	flags.ExperimentalIndicator = (th[5] & (1 << 2)) != 0 // 3.1.c
	flags.FooterPresent = (th[5] & (1 << 3)) != 0         // 3.1.d

	return flags
}
411588
func Tag(key string, value interface{}) Option {
	return func(c *Options) {
		c.tags = append(c.tags, opentracing.Tag{Key: key, Value: value})
	}
}
590163
func (r *Reader) ReadValue(v reflect.Value) {
	tag := r.readByte()
	decoder := valueDecoders[v.Kind()]
	decoder(r, v, tag)
}
871009
func (r *Reader) ReadString() string {
	tag := r.readByte()
	decoder := stringDecoders[tag]
	if decoder == nil {
		castError(tag, "string")
	}
	return decoder(r)
}