// Tag returns the tag parts.
429985
func (tn *tagNode) Tag() []string {
	out := make([]string, len(tn.tag))
	copy(out, tn.tag)
	return out
}
825585
func (s *PartOfSpeechTag) SetTag(v string) *PartOfSpeechTag {
	s.Tag = &v
	return s
}
1251162
func (c IndexEntries) StringByTag(tag int) string {
	s := c.StringsByTag(tag)
	if s == nil || len(s) == 0 {
		return ""
	}
	return s[0]
}
174466
func (t *Tag) String() string {
	var buf bytes.Buffer
	buf.WriteByte('{')
	buf.WriteString(string(t.Key))
	buf.WriteByte(' ')
	buf.WriteString(string(t.Value))
	buf.WriteByte('}')
	return buf.String()
}
731278
func (search *Search) Tags(tag string) (*SearchResult, error) {
	insta := search.inst
	body, err := insta.sendRequest(
		&reqOptions{
			Endpoint: urlSearchTag,
			Query: map[string]string{
				"is_typeahead": "true",
				"rank_token":   insta.rankToken,
				"q":            tag,
			},
		},
	)
	if err != nil {
		return nil, err
	}

	res := &SearchResult{}
	err = json.Unmarshal(body, res)
	return res, err
}
509637
func (e Error) Tag(tag Error) Error {
	return Error(string(tag) + ":" + string(e))
}
216614
func (r *Record) Tag(tag []byte) (v Aux, ok bool) {
	if len(tag) < 2 {
		panic("sam: tag too short")
	}
	for _, aux := range r.AuxFields {
		if aux.matches(tag) {
			return aux, true
		}
	}
	return nil, false
}
959876
func (blog *BLog) Tags() map[string]string {
	blog.lock.RLock()
	defer blog.lock.RUnlock()
	return blog.tags
}
536048
func (dfs *DistributedFilesystem) Tag(snapshotID string, tagName string) error {
	// Get the parent volume that owns the snapshot
	vol, err := dfs.disk.GetTenant(snapshotID)
	if err != nil {
		glog.Errorf("Could not get tenant of snapshot %s: %s", snapshotID, err)
		return err
	}
	// Add a tag to the snapshot
	if err := vol.TagSnapshot(snapshotID, tagName); err != nil {
		glog.Errorf("Could not add tag %s to snapshot %s: %s", tagName, snapshotID, err)
		return err
	}
	return nil
}
427258
func (f *Field) AddTag(tag string) FieldInterface {
	f.tag[tag] = struct{}{}
	return f
}
260781
func (t *tags) All(ctx context.Context) ([]string, error) {
	var tags []string

	listURLStr, err := t.ub.BuildTagsURL(t.name)
	if err != nil {
		return tags, err
	}

	listURL, err := url.Parse(listURLStr)
	if err != nil {
		return tags, err
	}

	for {
		resp, err := t.client.Get(listURL.String())
		if err != nil {
			return tags, err
		}
		defer resp.Body.Close()

		if SuccessStatus(resp.StatusCode) {
			b, err := ioutil.ReadAll(resp.Body)
			if err != nil {
				return tags, err
			}

			tagsResponse := struct {
				Tags []string `json:"tags"`
			}{}
			if err := json.Unmarshal(b, &tagsResponse); err != nil {
				return tags, err
			}
			tags = append(tags, tagsResponse.Tags...)
			if link := resp.Header.Get("Link"); link != "" {
				linkURLStr := strings.Trim(strings.Split(link, ";")[0], "<>")
				linkURL, err := url.Parse(linkURLStr)
				if err != nil {
					return tags, err
				}

				listURL = listURL.ResolveReference(linkURL)
			} else {
				return tags, nil
			}
		} else {
			return tags, HandleErrorResponse(resp)
		}
	}
}
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
}
1212133
func (writer *ConsoleWriter) Tags() map[string]string {
	writer.lock.RLock()
	defer writer.lock.RUnlock()

	return writer.blog.Tags()
}
310526
func Tags(tags map[string]string) SpanOption {
	return func(t *Tracer, s *spanImpl) {
		for k, v := range tags {
			s.Tags[k] = v
		}
	}
}
1357818
func (bltn *Bulletin) Tags() Tags {
	m := bltn.Wire.GetMessage()
	return ParseTags(m)
}
681788
func (t *Tag) GetTag() string {
	if t == nil || t.Tag == nil {
		return ""
	}
	return *t.Tag
}
944974
func (c *TasksRequestsCall) Tags(tags ...string) *TasksRequestsCall {
	c.urlParams_.SetMulti("tags", append([]string{}, tags...))
	return c
}