mirror of
https://github.com/golang/go
synced 2024-11-25 20:57:57 -07:00
25733a94fd
Each package using struct field tags assumes that it is the only package storing data in the tag. This CL adds support in package reflect for sharing tags between multiple packages. In this scheme, the tags must be of the form key:"value" key2:"value2" (raw strings help when writing that tag in Go source). reflect.StructField's Tag field now has type StructTag (a string type), which has method Get(key string) string that returns the associated value. Clients of json and xml will need to be updated. Code that says type T struct { X int "name" } should become type T struct { X int `json:"name"` // or `xml:"name"` } Use govet to identify struct tags that need to be changed to use the new syntax. R=r, r, dsymonds, bradfitz, kevlar, fvbommel, n13m3y3r CC=golang-dev https://golang.org/cl/4645069 |
||
---|---|---|
.. | ||
asn1_test.go | ||
asn1.go | ||
common.go | ||
Makefile | ||
marshal_test.go | ||
marshal.go |