Type: v.Type(),
})
}
- v.Set(reflect.ValueOf(d.buf.Bytes()))
+ sl := make([]byte, len(d.buf.Bytes()))
+ copy(sl, d.buf.Bytes())
+ v.Set(reflect.ValueOf(sl))
default:
panic(&UnmarshalTypeError{
Value: "string",
switch b {
case 'd', 'l':
// read until there is nothing to read
- for d.read_one_value() {}
+ for d.read_one_value() {
+ }
// consume 'e' as well
b = d.read_byte()
d.buf.WriteByte(b)
start := d.buf.Len() - 1
d.read_until(':')
length, err := strconv.ParseInt(d.buf.String()[start:], 10, 64)
- check_for_int_parse_error(err, d.offset - 1)
+ check_for_int_parse_error(err, d.offset-1)
d.buf.WriteString(":")
n, err := io.CopyN(&d.buf, d, length)