errTagSyntax = errors.New("bad syntax for struct tag pair")
errTagKeySyntax = errors.New("bad syntax for struct tag key")
errTagValueSyntax = errors.New("bad syntax for struct tag value")
- errTagValueSpace = errors.New("suspicious space found in struct tag value")
+ errTagValueSpace = errors.New("suspicious space in struct tag value")
errTagSpace = errors.New("key:\"value\" pairs not separated by spaces")
)
type UnexpectedSpacetest struct {
A int `json:"a,omitempty"`
- B int `json:"b, omitempty"` // ERROR "suspicious space found in struct tag value"
+ B int `json:"b, omitempty"` // ERROR "suspicious space in struct tag value"
C int `json:"c ,omitempty"`
- D int `json:"d,omitempty, string"` // ERROR "suspicious space found in struct tag value"
+ D int `json:"d,omitempty, string"` // ERROR "suspicious space in struct tag value"
E int `xml:"e local"`
- F int `xml:"f "` // ERROR "suspicious space found in struct tag value"
- G int `xml:" g"` // ERROR "suspicious space found in struct tag value"
- H int `xml:"h ,omitempty"` // ERROR "suspicious space found in struct tag value"
- I int `xml:"i, omitempty"` // ERROR "suspicious space found in struct tag value"
- J int `xml:"j local ,omitempty"` // ERROR "suspicious space found in struct tag value"
- K int `xml:"k local, omitempty"` // ERROR "suspicious space found in struct tag value"
- L int `xml:" l local,omitempty"` // ERROR "suspicious space found in struct tag value"
- M int `xml:"m local,omitempty"` // ERROR "suspicious space found in struct tag value"
- N int `xml:" "` // ERROR "suspicious space found in struct tag value"
+ F int `xml:"f "` // ERROR "suspicious space in struct tag value"
+ G int `xml:" g"` // ERROR "suspicious space in struct tag value"
+ H int `xml:"h ,omitempty"` // ERROR "suspicious space in struct tag value"
+ I int `xml:"i, omitempty"` // ERROR "suspicious space in struct tag value"
+ J int `xml:"j local ,omitempty"` // ERROR "suspicious space in struct tag value"
+ K int `xml:"k local, omitempty"` // ERROR "suspicious space in struct tag value"
+ L int `xml:" l local,omitempty"` // ERROR "suspicious space in struct tag value"
+ M int `xml:"m local,omitempty"` // ERROR "suspicious space in struct tag value"
+ N int `xml:" "` // ERROR "suspicious space in struct tag value"
O int `xml:""`
P int `xml:","`
Q int `foo:" doesn't care "`