Len returns the view's length.
()
| 37 | |
| 38 | // Len returns the view's length. |
| 39 | func (v ByteView) Len() int { |
| 40 | if v.b != nil { |
| 41 | return len(v.b) |
| 42 | } |
| 43 | return len(v.s) |
| 44 | } |
| 45 | |
| 46 | // ByteSlice returns a copy of the data as a byte slice. |
| 47 | func (v ByteView) ByteSlice() []byte { |
no outgoing calls
no test coverage detected