FromSlice creates Bytes from the specified slice.
(b []byte)
| 291 | |
| 292 | // FromSlice creates Bytes from the specified slice. |
| 293 | func FromSlice(b []byte) Bytes { |
| 294 | var r Bytes |
| 295 | |
| 296 | r.sliceBuf[0] = b |
| 297 | r.Slices = r.sliceBuf[:] |
| 298 | |
| 299 | return r |
| 300 | } |
no outgoing calls