0
0
Fork 0

additional golint cleanups

This commit is contained in:
Marty Schoch 2016-10-02 11:44:34 -04:00
parent ee6b698edb
commit ce572091eb
1 changed files with 3 additions and 4 deletions

View File

@ -36,8 +36,7 @@ func NewFragmenter(fragmentSize int) *Fragmenter {
}
func (s *Fragmenter) Fragment(orig []byte, ot highlight.TermLocations) []*highlight.Fragment {
rv := make([]*highlight.Fragment, 0)
var rv []*highlight.Fragment
maxbegin := 0
OUTER:
for currTermIndex, termLocation := range ot {
@ -52,7 +51,7 @@ OUTER:
continue OUTER // bail
}
end += size
used += 1
used++
}
// if we still have more characters available to us
@ -65,7 +64,7 @@ OUTER:
}
if start-size >= maxbegin {
start -= size
used += 1
used++
} else {
break
}