reflect.StructField.Name (field)
53 uses
reflect (current package)
type.go#L1142: Name string
type.go#L1248: f.Name = p.name.name()
type.go#L2450: if field.Name == "" {
type.go#L2453: if !isValidFieldName(field.Name) {
type.go#L2669: {Name: "S", Type: TypeOf(structType{})},
type.go#L2670: {Name: "U", Type: TypeOf(uncommonType{})},
type.go#L2671: {Name: "M", Type: ArrayOf(len(methods), TypeOf(methods[0]))},
type.go#L2834: panic("reflect.StructOf: field \"" + field.Name + "\" is anonymous but has PkgPath set")
type.go#L2840: c := field.Name[0]
type.go#L2842: panic("reflect.StructOf: field \"" + field.Name + "\" is unexported but missing PkgPath")
type.go#L2853: name: newName(field.Name, string(field.Tag), field.IsExported()),
visiblefields.go#L36: if f.Name == "" {
visiblefields.go#L70: if oldIndex, ok := w.byName[f.Name]; ok {
visiblefields.go#L77: old.Name = ""
visiblefields.go#L81: old.Name = ""
visiblefields.go#L91: w.byName[f.Name] = len(w.fields)
encoding/binary
binary.go#L557: if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" {
binary.go#L622: if v := v.Field(i); v.CanSet() || t.Field(i).Name != "_" {
encoding/json
decode.go#L150: return "json: cannot unmarshal object key " + strconv.Quote(e.Key) + " into unexported field " + e.Field.Name + " of type " + e.Type.String()
encode.go#L1294: name = sf.Name
encoding/xml
typeinfo.go#L96: if f.Name == xmlName {
typeinfo.go#L153: if f.Name == xmlName || tag != "" && mode != fAttr {
typeinfo.go#L168: f.Name, typ, f.Tag.Get("xml"))
typeinfo.go#L175: f.Name, typ, f.Tag.Get("xml"))
typeinfo.go#L178: if f.Name == xmlName {
typeinfo.go#L193: finfo.name = f.Name
typeinfo.go#L201: parents[0] = f.Name
typeinfo.go#L204: return nil, fmt.Errorf("xml: trailing '>' in field %s of type %s", f.Name, typ)
typeinfo.go#L222: finfo.name, typ, f.Name, xmlname.name, ftyp)
typeinfo.go#L240: if f.Name != xmlName {
typeinfo.go#L320: return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")}
fmt
print.go#L801: if name := f.Type().Field(i).Name; name != "" {
github.com/go-pg/pg/v10/orm
table.go#L299: switch f.Name {
table.go#L308: t.TypeName, f.Name, pgTag.Name,
table.go#L314: internal.Warn.Printf("%s.%s has unknown tag option: %q", t.TypeName, f.Name, name)
table.go#L364: sqlName := internal.Underscore(f.Name)
table.go#L369: t.TypeName, f.Name, pgTag.Name,
table.go#L375: internal.Warn.Printf("%s.%s has unknown tag option: %q", t.TypeName, f.Name, name)
table.go#L396: GoName: f.Name,
github.com/golang/protobuf/proto
properties.go#L240: p.Init(f.Type, f.Name, tagField, &f)
properties.go#L282: p.Prop.Name = f.Name
github.com/google/go-cmp/cmp
compare.go#L383: step.name = t.Field(i).Name
report_reflect.go#L202: if supportExporters && !isExported(sf.Name) {
report_reflect.go#L206: list = append(list, textRecord{Key: sf.Name, Value: s})
github.com/google/go-cmp/cmp/internal/value
name.go#L108: b = append(b, sf.Name...)
github.com/vmihailenco/msgpack/v5
types.go#L188: if f.Name == "_msgpack" {
types.go#L223: field.name = f.Name
go/ast
print.go#L221: if name := t.Field(i).Name; IsExported(name) {
google.golang.org/protobuf/internal/impl
legacy_message.go#L131: if f.Tag.Get("protobuf") != "" || f.Tag.Get("protobuf_oneof") != "" || strings.HasPrefix(f.Name, "XXX_") {
message.go#L157: switch f := t.Field(i); f.Name {
internal/buildcfg
exp.go#L75: names[strings.ToLower(rt.Field(i).Name)] = field.SetBool
exp.go#L144: name := strings.ToLower(rt.Field(i).Name)