reflect.StructTag.Get (method)
118 uses
reflect (current package)
type.go#L1120: func (tag StructTag) Get(key string) string {
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#L39: t := tag.Get("type")
build.go#L81: if payload := tag.Get("payload"); payload != "" {
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#L219: format := tag.Get("timestampFormat")
unmarshal.go#L86: t := tag.Get("type")
unmarshal.go#L144: if payload := tag.Get("payload"); payload != "" {
unmarshal.go#L157: if locName := field.Tag.Get("locationName"); locName != "" {
unmarshal.go#L244: format := tag.Get("timestampFormat")
github.com/aws/aws-sdk-go/private/protocol/query/queryutil
queryutil.go#L42: t := tag.Get("type")
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#L129: if !q.isEC2 && tag.Get("flattened") == "" {
queryutil.go#L130: if listName := tag.Get("locationNameList"); listName == "" {
queryutil.go#L159: if !q.isEC2 && tag.Get("flattened") == "" {
queryutil.go#L179: kname := tag.Get("locationNameKey")
queryutil.go#L183: vname := tag.Get("locationNameValue")
queryutil.go#L236: format := tag.Get("timestampFormat")
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#L137: if payloadName := field.Tag.Get("payload"); payloadName != "" {
build.go#L139: if ptag := pfield.Tag.Get("type"); ptag != "" && ptag != "structure" {
build.go#L177: prefix := tag.Get("locationName")
build.go#L285: format := tag.Get("timestampFormat")
build.go#L288: if tag.Get("location") == "querystring" {
build.go#L298: if tag.Get("location") == "header" {
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#L140: prefix := field.Tag.Get("locationName")
unmarshal.go#L190: switch tag.Get("type") {
unmarshal.go#L233: format := tag.Get("timestampFormat")
unmarshal.go#L244: if tag.Get("location") == "header" {
github.com/aws/aws-sdk-go/private/protocol/xml/xmlutil
build.go#L60: } else if tag.Get("location") != "" { // don't handle non-body location values
build.go#L64: xml := tag.Get("xml")
build.go#L72: t := tag.Get("type")
build.go#L107: if payload := tag.Get("payload"); payload != "" {
build.go#L117: child := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
build.go#L120: if prefix, uri := tag.Get("xmlPrefix"), tag.Get("xmlURI"); uri != "" {
build.go#L143: if field.Tag.Get("ignore") != "" {
build.go#L148: if mTag.Get("location") != "" { // skip non-body members
build.go#L159: memberName := mTag.Get("locationName")
build.go#L186: flattened := tag.Get("flattened") != ""
build.go#L188: xname := xml.Name{Local: tag.Get("locationName")}
build.go#L202: iname := tag.Get("locationNameList")
build.go#L227: maproot := NewXMLElement(xml.Name{Local: tag.Get("locationName")})
build.go#L232: if n := tag.Get("locationNameKey"); n != "" {
build.go#L235: if n := tag.Get("locationNameValue"); n != "" {
build.go#L250: if tag.Get("flattened") == "" { // add "entry" tag to non-flat maps
build.go#L296: format := tag.Get("timestampFormat")
build.go#L304: tag.Get("locationName"), value.Interface(), value.Type().Name())
build.go#L307: xname := xml.Name{Local: tag.Get("locationName")}
build.go#L308: if tag.Get("xmlAttribute") != "" { // put into current node's attribute list
unmarshal.go#L67: xml := tag.Get("xml")
unmarshal.go#L80: t := tag.Get("type")
unmarshal.go#L129: if payload := tag.Get("payload"); payload != "" {
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#L173: if tag.Get("flattened") == "" { // look at all item entries
unmarshal.go#L175: if name := tag.Get("locationNameList"); name != "" {
unmarshal.go#L214: if tag.Get("flattened") == "" { // look at all child entries
unmarshal.go#L228: if n := tag.Get("locationNameKey"); n != "" {
unmarshal.go#L231: if n := tag.Get("locationNameValue"); n != "" {
unmarshal.go#L285: format := tag.Get("timestampFormat")
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"))
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" {
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")
 |
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. |