Skip to content

Commit

Permalink
add missed comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ergoz committed Apr 15, 2021
1 parent f5e98ec commit 42cec80
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions buflice.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,14 @@ func (bs *Buflice) Close() error {
return nil
}

// GetCurrentLen function to get current batch size
func (bs *Buflice) GetCurrentLen() int {
bs.mu.Lock()
defer bs.mu.Unlock()
return len(bs.slice)
}

// GetCap function to get max batch size
func (bs *Buflice) GetCap() int {
bs.mu.Lock()
defer bs.mu.Unlock()
Expand Down

0 comments on commit 42cec80

Please sign in to comment.