// getFieldName gets the field name.  If field tags are being used and the field
// is tagged with -, or skip this field, an empty string will be returned;
// which is a signal to skip this field.
764071
func (e *Encoder) getFieldName(field reflect.StructField) string {
	if e.useTags {
		name := field.Tag.Get(e.tag)
		// skip columns tagged with -
		if name == "-" {
			return ""
		}
		if name != "" {
			return name
		}
	}
	return field.Name

}
1270042
func (f *Form) GetField(name string) *Field {
	for _, field := range f.Fields {
		if field.Name == name {
			return field
		}
	}
	return nil
}
428781
func (s *DeleteResolverInput) SetFieldName(v string) *DeleteResolverInput {
	s.FieldName = &v
	return s
}
592830
func (lt *Translator) getFieldTranslator(field string) (*FieldTranslator, error) {
	lt.lock.RLock()
	if tr, ok := lt.fields[field]; ok {
		lt.lock.RUnlock()
		return tr, nil
	}
	lt.lock.RUnlock()
	lt.lock.Lock()
	defer lt.lock.Unlock()
	if tr, ok := lt.fields[field]; ok {
		return tr, nil
	}
	lft, err := NewFieldTranslator(lt.dirname, field)
	if err != nil {
		return nil, errors.Wrap(err, "creating new FieldTranslator")
	}
	lt.fields[field] = lft
	return lft, nil
}
1281939
func fieldFlagName(fieldName string) flagNameComponent {
	return flagNameComponent(func() (ret []rune) {
		fieldNameRunes := []rune(fieldName)
		for i, r := range fieldNameRunes {
			prevUpper := func() bool { return unicode.IsUpper(fieldNameRunes[i-1]) }
			nextUpper := func() bool { return unicode.IsUpper(fieldNameRunes[i+1]) }
			if i == 0 || (prevUpper() && (i == len(fieldNameRunes)-1 || nextUpper())) {
				r = unicode.ToLower(r)
			}
			ret = append(ret, r)
		}
		return
	}())
}
1087347
func formatFieldName(name string) string {
	var formatted string
	for _, v := range strings.Split(name, "-") {
		formatted += strings.Title(v)
	}
	return formatted
}
88350
func getTagName(tokenizer *html.Tokenizer) string {
	tagName, _ := tokenizer.TagName()
	return string(tagName)
}
1093846
func (typeProperty *TypeProperty) FieldName() string {
	propertyName := typeProperty.Name
	if propertyName == "$ref" {
		return "XRef"
	}
	return strings.Title(snakeCaseToCamelCase(propertyName))
}
382541
func (s *Schema) FieldsName(name string, includeDynamic, showDefaults bool) (*SolrResponse, error) {
	params := &url.Values{}
	if includeDynamic {
		params.Set("includeDynamic", "true")
	}
	if showDefaults {
		params.Set("showDefaults", "true")
	}
	return s.Get(fmt.Sprintf("fields/%s", name), params)
}
487404
func (s *Selector) SetFieldName(v string) *Selector {
	s.FieldName = &v
	return s
}
377536
func GetKeyField(keyString string, v reflect.Value) reflect.Value {
	return v.Elem().FieldByName(keyString)
}
219450
func GetFieldTag(obj interface{}, fieldName, tagKey string) (string, error) {
	if !hasValidType(obj, []reflect.Kind{reflect.Struct, reflect.Ptr}) {
		return "", errors.New("Cannot use GetField on a non-struct interface")
	}

	objValue := reflectValue(obj)
	objType := objValue.Type()

	field, ok := objType.FieldByName(fieldName)
	if !ok {
		return "", fmt.Errorf("No such field: %s in obj", fieldName)
	}

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

	return field.Tag.Get(tagKey), nil
}
380143
func GetName(n ast.Node) (name string, exists bool) {
	var ident_ interface{}
	if idt, exists := getStructField(n, "Name"); exists {
		ident_ = idt
	} else if idt, exists := getStructField(n, "Sel"); exists {
		ident_ = idt
	}
	if ident_ == nil {
		return "", false
	}

	nodeName, isIdent := ident_.(*ast.Ident)
	if !isIdent {
		return "", false
	}
	return nodeName.Name, true
}
616794
func (t *Team) GetName() string {
	if t == nil || t.Name == nil {
		return ""
	}
	return *t.Name
}
313938
func (r *RepositoryRelease) GetTagName() string {
	if r == nil || r.TagName == nil {
		return ""
	}
	return *r.TagName
}
626055
func (w *WebHookAuthor) GetName() string {
	if w == nil || w.Name == nil {
		return ""
	}
	return *w.Name
}
388982
func (x *Exif) Get(name FieldName) (*tiff.Tag, error) {
	if tg, ok := x.main[name]; ok {
		return tg, nil
	}
	return nil, TagNotPresentError(name)
}