addressed linting and spelling.
This commit is contained in:
@@ -12,7 +12,7 @@ const (
|
||||
minResolution = 3
|
||||
)
|
||||
|
||||
// BPS calculates bandwith rates.
|
||||
// BPS calculates bandwidth rates.
|
||||
//
|
||||
// Instantiate a BPS using one of the New* functions then feed bytes either via
|
||||
// BPS.Add, or writing to it (it implements io.Writer). When the accumulated
|
||||
@@ -118,7 +118,7 @@ func (b *BPS) Add(i int64) {
|
||||
// Rate returns the current rate (bytes / second).
|
||||
func (b *BPS) Rate() float64 {
|
||||
b.Lock()
|
||||
var total int64 = 0
|
||||
var total int64
|
||||
for _, b := range b.buckets {
|
||||
total += b
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user