reflect.StructField.Tag (field)
95 uses
reflect (current package)
type.go#L1099: Tag StructTag // field tag string
type.go#L1198: f.Tag = StructTag(tag)
type.go#L2791: name: newName(field.Name, string(field.Tag), exported),
encoding/asn1
asn1.go#L935: innerOffset, err = parseField(val.Field(i), innerBytes, innerOffset, parseFieldParameters(field.Tag.Get("asn1")))
marshal.go#L523: return makeField(v.Field(startingField), parseFieldParameters(t.Field(startingField).Tag.Get("asn1")))
marshal.go#L527: m[i], err = makeField(v.Field(i+startingField), parseFieldParameters(t.Field(i+startingField).Tag.Get("asn1")))
encoding/json
encode.go#L1258: tag := sf.Tag.Get("json")
encoding/xml
typeinfo.go#L63: if (f.PkgPath != "" && !f.Anonymous) || f.Tag.Get("xml") == "-" {
typeinfo.go#L117: tag := f.Tag.Get("xml")
typeinfo.go#L168: f.Name, typ, f.Tag.Get("xml"))
typeinfo.go#L175: f.Name, typ, f.Tag.Get("xml"))
typeinfo.go#L320: return &TagPathError{typ, f1.Name, f1.Tag.Get("xml"), f2.Name, f2.Tag.Get("xml")}
github.com/aws/aws-sdk-go/aws/awsutil
string_value.go#L40: if tag := ft.Tag.Get("sensitive"); tag == "true" {
github.com/aws/aws-sdk-go/private/protocol
idempotency.go#L25: return u == nil && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
idempotency.go#L27: return len(u) == 0 && len(f.Tag.Get(idempotencyTokenFillTag)) != 0
github.com/aws/aws-sdk-go/private/protocol/json/jsonutil
build.go#L63: tag = field.Tag
build.go#L83: tag = field.Tag
build.go#L106: if field.Tag.Get("json") == "-" {
build.go#L109: if field.Tag.Get("location") != "" {
build.go#L112: if field.Tag.Get("ignore") != "" {
build.go#L133: if locName := field.Tag.Get("locationName"); locName != "" {
build.go#L140: err := buildAny(member, buf, field.Tag)
unmarshal.go#L110: tag = field.Tag
unmarshal.go#L146: return u.unmarshalAny(value.FieldByName(payload), data, field.Tag)
unmarshal.go#L157: if locName := field.Tag.Get("locationName"); locName != "" {
unmarshal.go#L172: err := u.unmarshalAny(member, mapData[name], field.Tag)
github.com/aws/aws-sdk-go/private/protocol/query/queryutil
queryutil.go#L79: if field.Tag.Get("ignore") != "" {
queryutil.go#L90: name = field.Tag.Get("queryName")
queryutil.go#L93: if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
queryutil.go#L94: name = field.Tag.Get("locationNameList")
queryutil.go#L95: } else if locName := field.Tag.Get("locationName"); locName != "" {
queryutil.go#L110: if err := q.parseValue(v, elemValue, name, field.Tag); err != nil {
github.com/aws/aws-sdk-go/private/protocol/rest
build.go#L81: name := field.Tag.Get("locationName")
build.go#L95: if field.Tag.Get("ignore") != "" {
build.go#L103: if field.Tag.Get("marshal-as") == "blob" {
build.go#L108: switch field.Tag.Get("location") {
build.go#L110: err = buildHeaderMap(&r.HTTPRequest.Header, m, field.Tag)
build.go#L112: err = buildHeader(&r.HTTPRequest.Header, m, name, field.Tag)
build.go#L114: err = buildURI(r.HTTPRequest.URL, m, name, field.Tag)
build.go#L116: err = buildQueryString(query, m, name, field.Tag)
build.go#L119: err = buildQueryString(query, m, name, field.Tag)
build.go#L137: if payloadName := field.Tag.Get("payload"); payloadName != "" {
build.go#L139: if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
payload.go#L16: if payloadName := field.Tag.Get("payload"); payloadName != "" {
payload.go#L18: if field.Tag.Get("type") != "structure" {
payload.go#L38: if payloadName := field.Tag.Get("payload"); payloadName != "" {
payload.go#L40: return member.Tag.Get("type")
unmarshal.go#L62: if payloadName := field.Tag.Get("payload"); payloadName != "" {
unmarshal.go#L64: if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
unmarshal.go#L124: name := field.Tag.Get("locationName")
unmarshal.go#L129: switch field.Tag.Get("location") {
unmarshal.go#L134: err := unmarshalHeader(m, resp.Header.Get(name), field.Tag)
unmarshal.go#L140: prefix := field.Tag.Get("locationName")
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
build.go#L87: tag = tag + reflect.StructTag(" ") + field.Tag
build.go#L109: tag = field.Tag
build.go#L143: if field.Tag.Get("ignore") != "" {
build.go#L147: mTag := field.Tag
unmarshal.go#L101: tag = field.Tag
unmarshal.go#L131: return parseStruct(r.FieldByName(payload), node, field.Tag)
unmarshal.go#L142: if field.Tag.Get("flattened") != "" && field.Tag.Get("locationNameList") != "" {
unmarshal.go#L143: name = field.Tag.Get("locationNameList")
unmarshal.go#L144: } else if locName := field.Tag.Get("locationName"); locName != "" {
unmarshal.go#L159: err := parse(member, elem, field.Tag)
github.com/ghodss/yaml
fields.go#L161: tag := sf.Tag.Get("json")
github.com/go-git/gcfg
set.go#L46: t := newTag(f.Tag.Get("gcfg"))
set.go#L55: return v.FieldByName(f.Name), newTag(f.Tag.Get("gcfg"))
github.com/golang/protobuf/proto
properties.go#L206: p.MapKeyProp.Init(nil, "Key", f.Tag.Get("protobuf_key"), nil)
properties.go#L208: p.MapValProp.Init(nil, "Value", f.Tag.Get("protobuf_val"), nil)
properties.go#L239: tagField := f.Tag.Get("protobuf")
properties.go#L242: tagOneof := f.Tag.Get("protobuf_oneof")
properties.go#L283: p.Prop.Parse(f.Tag.Get("protobuf"))
github.com/google/go-cmp/cmp/internal/value
name.go#L105: if sf.Tag != "" {
name.go#L107: b = strconv.AppendQuote(b, string(sf.Tag))
golang.org/x/crypto/ssh
messages.go#L347: tagStr := structType.Field(0).Tag.Get("sshtype")
messages.go#L451: if structType.Field(i).Tag.Get("ssh") == "rest" {
messages.go#L538: if v.Type().Field(i).Tag.Get("ssh") != "rest" {
golang.org/x/pkgsite/internal/godoc/codec
generate.go#L278: if tag, _ := f.Tag.Lookup(fieldTagKey); tag == "-" {
google.golang.org/api/internal/gensupport
json.go#L57: jsonTag := st.Field(i).Tag.Get("json")
google.golang.org/protobuf/internal/impl
legacy_message.go#L121: if f.Tag.Get("protobuf") != "" || f.Tag.Get("protobuf_oneof") != "" || strings.HasPrefix(f.Name, "XXX_") {
legacy_message.go#L183: if tag := f.Tag.Get("protobuf"); tag != "" {
legacy_message.go#L226: if tag := f.Tag.Get("protobuf"); tag != "" {
legacy_message.go#L227: tagKey := f.Tag.Get("protobuf_key")
legacy_message.go#L228: tagVal := f.Tag.Get("protobuf_val")
legacy_message.go#L231: if tag := f.Tag.Get("protobuf_oneof"); tag != "" {
legacy_message.go#L243: if tag := f.Tag.Get("protobuf"); tag != "" {
message.go#L168: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") {
message.go#L175: if s := f.Tag.Get("protobuf_oneof"); len(s) > 0 {
message.go#L196: for _, s := range strings.Split(f.Tag.Get("protobuf"), ",") {
gopkg.in/yaml.v2
yaml.go#L330: tag := field.Tag.Get("yaml")
yaml.go#L331: if tag == "" && strings.Index(string(field.Tag), ":") < 0 {
yaml.go#L332: tag = string(field.Tag)
 |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |