(b []byte)
| 247 | } |
| 248 | |
| 249 | func (s *allocBytesSink) setBytesOwned(b []byte) error { |
| 250 | if s.dst == nil { |
| 251 | return errors.New("nil AllocatingByteSliceSink *[]byte dst") |
| 252 | } |
| 253 | *s.dst = cloneBytes(b) // another copy, protecting the read-only s.v.b view |
| 254 | s.v.b = b |
| 255 | s.v.s = "" |
| 256 | return nil |
| 257 | } |
| 258 | |
| 259 | func (s *allocBytesSink) SetString(v string) error { |
| 260 | if s.dst == nil { |
no test coverage detected