Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Since byte slices are considered a base element and not a slice in terms of parsing we must handle it separately. Tested with "AByteSlice" in `_generate/allownil.go`: ``` // string "abyteslice" o = append(o, 0xaa, 0x61, 0x62, 0x79, 0x74, 0x65, 0x73, 0x6c, 0x69, 0x63, 0x65) if z.AByteSlice == nil { // allownil: if nil o = msgp.AppendNil(o) } else { o = msgp.AppendBytes(o, z.AByteSlice) } ``` ``` case "abyteslice": if msgp.IsNil(bts) { bts = bts[1:] z.AByteSlice = nil } else { z.AByteSlice, bts, err = msgp.ReadBytesBytes(bts, z.AByteSlice) if err != nil { err = msgp.WrapError(err, "AByteSlice") return } } ```
- Loading branch information