ByteSlice returns a copy of the data as a byte slice.
()
| 45 | |
| 46 | // ByteSlice returns a copy of the data as a byte slice. |
| 47 | func (v ByteView) ByteSlice() []byte { |
| 48 | if v.b != nil { |
| 49 | return cloneBytes(v.b) |
| 50 | } |
| 51 | return []byte(v.s) |
| 52 | } |
| 53 | |
| 54 | // String returns the data as a string, making a copy if necessary. |
| 55 | func (v ByteView) String() string { |
nothing calls this directly
no test coverage detected