@@ -75,7 +75,7 @@ type Hasher struct {
7575 blocksize int // segment size (size of hash) also for hash.Hash
7676 count int // segment count
7777 size int // for hash.Hash same as hashsize
78- cur int // cursor position for righmost currently open chunk
78+ cur int // cursor position for rightmost currently open chunk
7979 segment []byte // the rightmost open segment (not complete)
8080 depth int // index of last level
8181 result chan []byte // result channel
@@ -149,7 +149,7 @@ func NewTreePool(hasher BaseHasher, segmentCount, capacity int) *TreePool {
149149 }
150150}
151151
152- // Drain drains the pool uptil it has no more than n resources
152+ // Drain drains the pool until it has no more than n resources
153153func (self * TreePool ) Drain (n int ) {
154154 self .lock .Lock ()
155155 defer self .lock .Unlock ()
@@ -412,11 +412,10 @@ func (self *Hasher) Reset() {
412412
413413// ResetWithLength needs to be called before writing to the hasher
414414// the argument is supposed to be the byte slice binary representation of
415- // the legth of the data subsumed under the hash
415+ // the length of the data subsumed under the hash
416416func (self * Hasher ) ResetWithLength (l []byte ) {
417417 self .Reset ()
418418 self .blockLength = l
419-
420419}
421420
422421// Release gives back the Tree to the pool whereby it unlocks
@@ -531,7 +530,7 @@ func (self *Hasher) finalise(n *Node, i int) (d int) {
531530 for {
532531 // when the final segment's path is going via left segments
533532 // the incoming data is pushed to the parent upon pulling the left
534- // we do not need toogle the state since this condition is
533+ // we do not need toggle the state since this condition is
535534 // detectable
536535 n .unbalanced = isLeft
537536 n .right = nil
0 commit comments