NewBytes constructs a Bytes value from a byte slice. If b is nil, nil is returned.
(b []byte)
| 19 | // |
| 20 | // If b is nil, nil is returned. |
| 21 | func NewBytes(b []byte) Bytes { return protocol.NewBytes(b) } |
| 22 | |
| 23 | // ReadAll reads b into a byte slice. |
| 24 | func ReadAll(b Bytes) ([]byte, error) { return protocol.ReadAll(b) } |