// NewTag creates a new Tag with code and value
175102
func NewTag(code int, value DataType) *Tag {
	tag := new(Tag)
	tag.Code = code
	tag.Value = value
	return tag
}
623763
func (logger *Logger) InitTag(tag ...string) {
	var t string
	var index uint64 // first index
	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(index, t)
}
1221529
func (m *Message) AddTag(tag ...string) error {
	if len(m.tags) >= MaxNumberOfTags {
		return fmt.Errorf("cannot add any new tags. Message tag limit (%b) reached", MaxNumberOfTags)
	}

	m.tags = append(m.tags, tag...)
	return nil
}
136191
func NewTag(tag string) Tag {
	var t Tag
	if copy(t[:], tag) != 2 {
		panic("sam: illegal tag length")
	}
	return t
}
1192415
func parseTag(tag string) (string, bool) {
	if idx := strings.Index(tag, ","); idx != -1 {
		if tag[idx+1:] == "omitempty" {
			return tag[:idx], true
		}
		return tag[:idx], false
	}
	return tag, false
}
1067079
func (g *Group) Imag(c Code) *Statement {
	s := Imag(c)
	g.items = append(g.items, s)
	return s
}
1045504
func NewTagger(backend ImageComponent, stdout io.Writer, names []string) (*Tagger, error) {
	reposAndTags, err := sanitizeRepoAndTags(names)
	if err != nil {
		return nil, err
	}
	return &Tagger{
		imageComponent: backend,
		stdout:         stdout,
		repoAndTags:    reposAndTags,
	}, nil
}
1070077
func (s *StartCelebrityRecognitionInput) SetJobTag(v string) *StartCelebrityRecognitionInput {
	s.JobTag = &v
	return s
}
411588
func Tag(key string, value interface{}) Option {
	return func(c *Options) {
		c.tags = append(c.tags, opentracing.Tag{Key: key, Value: value})
	}
}
500284
func ParseTag(readSeeker io.ReadSeeker) *Tag {
	header := ParseHeader(readSeeker)

	if header == nil {
		return nil
	}

	t := NewTag(header.version)
	t.Header = header

	var frame Framer
	size := int(t.size)
	for size > 0 {
		frame = t.frameConstructor(readSeeker)

		if frame == nil {
			break
		}

		id := frame.Id()
		t.frames[id] = append(t.frames[id], frame)
		frame.setOwner(t)

		size -= t.frameHeaderSize + int(frame.Size())
	}

	t.padding = uint(size)
	if _, err := readSeeker.Seek(int64(HeaderSize+t.Size()), os.SEEK_SET); err != nil {
		return nil
	}

	return t
}
831342
func (tag Tag) ToString() string {
	return fmt.Sprintf("{ Code: %v; Value: %v }", tag.Code, tag.Value.ToString())
}
852217
func NewTemplate(input string) (*Template, error) {
	hm, err := NewHelperMap()
	if err != nil {
		return nil, errors.WithStack(err)
	}
	t := &Template{
		Input:   input,
		Helpers: hm,
	}
	err = t.Parse()
	if err != nil {
		return t, errors.WithStack(err)
	}
	return t, nil
}
1325604
func Tag(tag string, m ...MarkupOrChild) *HTML {
	h := &HTML{
		tag: tag,
	}
	for _, m := range m {
		apply(m, h)
	}
	return h
}
646478
func parseTag(tag string) (string, tagOptions) {
	s := strings.Split(tag, ",")
	return s[0], s[1:]
}
716353
func (i Ref) WithNewTag(t string) Ref {
	var img Ref
	img = i
	img.Tag = t
	return img
}
1346707
func (c *Manager) UpdateTag(ctx context.Context, tag *Tag) error {
	spec := struct {
		Tag Tag `json:"update_spec"`
	}{
		Tag: Tag{
			Name:        tag.Name,
			Description: tag.Description,
		},
	}
	url := internal.URL(c, internal.TagPath).WithID(tag.ID)
	return c.Do(ctx, url.Request(http.MethodPatch, spec), nil)
}
827590
func NewTagMatcher(name string, value string) TagMatcher {
	return &tagMatcher{tag: StringTag(name, value)}
}