// InputTag creates an input for a field on the form Struct
421877
func (f FormFor) InputTag(field string, opts tags.Options) *tags.Tag {
	f.buildOptions(field, opts)
	f.addFormatTag(field, opts)
	return f.Form.InputTag(opts)
}
1107689
func GetFieldByTag(ival interface{}, tagName string, fieldNames []string) (interface{}, error) {
	if len(fieldNames) == 0 {
		return nil, trace.BadParameter("missing field names")
	}
	val := reflect.ValueOf(ival)
	if val.Kind() == reflect.Interface || val.Kind() == reflect.Ptr {
		val = val.Elem()
	}
	if val.Kind() != reflect.Struct {
		return nil, trace.NotFound("field name %v is not found", strings.Join(fieldNames, "."))
	}
	fieldName := fieldNames[0]
	rest := fieldNames[1:]

	valType := val.Type()
	for i := 0; i < valType.NumField(); i++ {
		tagValue := valType.Field(i).Tag.Get(tagName)
		parts := strings.Split(tagValue, ",")
		if parts[0] == fieldName {
			value := val.Field(i).Interface()
			if len(rest) == 0 {
				return value, nil
			}
			return GetFieldByTag(value, tagName, rest)
		}
	}
	return nil, trace.NotFound("field name %v is not found", strings.Join(fieldNames, "."))
}
5180
func (m *MockMutaterMachine) Tag() names_v2.MachineTag {
	ret := m.ctrl.Call(m, "Tag")
	ret0, _ := ret[0].(names_v2.MachineTag)
	return ret0
}
267825
func (c *SearchCall) Tag(tag ...string) *SearchCall {
	c.urlParams_.SetMulti("tag", append([]string{}, tag...))
	return c
}
406991
func typeTag(structType reflect.Type) byte {
	var tag byte
	var tagStr string
	tagStr = structType.Field(0).Tag.Get("sshtype")
	i, err := strconv.Atoi(tagStr)
	if err == nil {
		tag = byte(i)
	}
	return tag
}
656276
func GetFieldTag(obj interface{}, fieldName, tagKey string) (string, error) {
	field, err := getInnerFieldType(obj, fieldName)
	if err != nil {
		return "", err
	}

	if !isExportableField(field) {
		return "", errors.New("Cannot GetFieldTag on a non-exported struct field")
	}

	return field.Tag.Get(tagKey), nil
}
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)
}
716205
func (m *Model) ControllerTag() names.ControllerTag {
	return names.NewControllerTag(m.doc.ControllerUUID)
}
999658
func (c *Manager) GetTag(ctx context.Context, id string) (*Tag, error) {
	if isName(id) {
		tags, err := c.GetTags(ctx)
		if err != nil {
			return nil, err
		}

		for i := range tags {
			if tags[i].Name == id {
				return &tags[i], nil
			}
		}
	}

	url := internal.URL(c, internal.TagPath).WithID(id)
	var res Tag
	return &res, c.Do(ctx, url.Request(http.MethodGet), &res)

}
528549
func (s *Sentry) Tag(key, value string) {
	s.Lock()
	s.client.Tags[key] = value
	s.Unlock()
}
836367
func Tag(c context.Context, v string) context.Context {
	return context.WithValue(c, &clockTagKey, append(Tags(c), v))
}
1195828
func validateTag(rawRepo string) error {
	_, err := reference.ParseNormalizedNamed(rawRepo)

	return err
}
269173
func (f Form) SelectTag(opts tags.Options) *tags.Tag {
	return NewSelectTag(opts)
}
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)
}
217191
func (t Tags) GetTag(key string) (string, bool) {
	ret, ok := t[key]
	return string(ret), ok
}
429985
func (tn *tagNode) Tag() []string {
	out := make([]string, len(tn.tag))
	copy(out, tn.tag)
	return out
}
168995
func DefaultTagHandler(ctx *tagContext) error {
	if len(ctx.params) > 0 {
		ctx.col.Default = ctx.params[0]
	} else {
		ctx.col.Default = ctx.nextTag
		ctx.ignoreNext = true
	}
	return nil
}