Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove Peek
Browse files Browse the repository at this point in the history
  • Loading branch information
bzEq committed Mar 31, 2024
1 parent 7a4e4cf commit be2f4ba
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions core/iovec/iovec.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,17 +108,6 @@ func (self IoVec) At(i int) (byte, error) {
return 0, fmt.Errorf("Index %d out of bound", i)
}

func (self IoVec) Peek(i int) ([]byte, error) {
c := 0
for _, v := range self {
if i >= c && i < c+len(v) {
return v, nil
}
c += len(v)
}
return nil, fmt.Errorf("Index %d out of bound", i)
}

func (self *IoVec) Split(i int) (tail IoVec) {
c := 0
for k, v := range *self {
Expand Down

0 comments on commit be2f4ba

Please sign in to comment.