Skip to content

Commit

Permalink
Delete unused code.
Browse files Browse the repository at this point in the history
  • Loading branch information
robertabcd committed Nov 28, 2019
1 parent 82ed5e9 commit 768178b
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions article/segment.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,21 +92,6 @@ func (s *Segment) InnerBytes() []byte {
return s.Bytes()
}

func (s *Segment) Slice(i, j int) Segment {
b := s.Bytes()
if j < 0 {
j += len(b)
}
return Segment{
TermState: s.TermState,
Buffer: bytes.NewBuffer(b),
}
}

func (s *Segment) Split(at int) (Segment, Segment) {
return s.Slice(0, at), s.Slice(at, -1)
}

func (s *Segment) TrimRight(cutset string) {
s.Truncate(len(bytes.TrimRight(s.Bytes(), cutset)))
}

0 comments on commit 768178b

Please sign in to comment.