Len returns the number of bytes of the unread portion of the slice.
()
| 36 | // Len returns the number of bytes of the unread portion of the |
| 37 | // slice. |
| 38 | func (self *ZeroCopySource) Len() uint64 { |
| 39 | length := uint64(len(self.s)) |
| 40 | if self.off >= length { |
| 41 | return 0 |
| 42 | } |
| 43 | return length - self.off |
| 44 | } |
| 45 | |
| 46 | func (self *ZeroCopySource) Pos() uint64 { |
| 47 | return self.off |
no outgoing calls
no test coverage detected