File tree Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Expand file tree Collapse file tree 3 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ type X struct {
31
31
Others [][32 ]int32 // should compile to len(x.Others)*32*msgp.Int32Size
32
32
Matrix [][]int32 // should not optimize
33
33
ManyFixed []Fixed
34
+ WeirdTag string `msg:"\x0b"`
34
35
}
35
36
36
37
// test fixed-size struct
Original file line number Diff line number Diff line change @@ -128,7 +128,7 @@ func (d *decodeGen) structAsMap(s *Struct) {
128
128
d .p .print ("\n switch msgp.UnsafeString(field) {" )
129
129
for i := range s .Fields {
130
130
d .ctx .PushString (s .Fields [i ].FieldName )
131
- d .p .printf ("\n case \" %s \" :" , s .Fields [i ].FieldTag )
131
+ d .p .printf ("\n case %q :" , s .Fields [i ].FieldTag )
132
132
fieldElem := s .Fields [i ].FieldElem
133
133
anField := s .Fields [i ].HasTagPart ("allownil" ) && fieldElem .AllowNil ()
134
134
if anField {
Original file line number Diff line number Diff line change @@ -127,7 +127,7 @@ func (u *unmarshalGen) mapstruct(s *Struct) {
127
127
if ! u .p .ok () {
128
128
return
129
129
}
130
- u .p .printf ("\n case \" %s \" :" , s .Fields [i ].FieldTag )
130
+ u .p .printf ("\n case %q :" , s .Fields [i ].FieldTag )
131
131
u .ctx .PushString (s .Fields [i ].FieldName )
132
132
133
133
fieldElem := s .Fields [i ].FieldElem
You can’t perform that action at this time.
0 commit comments