Skip to content

Commit

Permalink
Add OverflowLimit to serialization example
Browse files Browse the repository at this point in the history
  • Loading branch information
turt2live committed Apr 1, 2024
1 parent 65da04f commit 6a7021d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion examples/serialize/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ func main() {
panic(err) // TODO: Handle error
}

// Set a value so we can compare later
// Set some values so we can compare later
bucket.OverflowLimit = 7
if err = bucket.Set(42); err != nil {
panic(err) // TODO: Handle error
}
Expand Down Expand Up @@ -43,4 +44,5 @@ func printBucket(bucket *leaky.Bucket) {
fmt.Println(" Capacity:", bucket.Capacity)
fmt.Println(" DrainBy:", bucket.DrainBy)
fmt.Println(" DrainInterval:", bucket.DrainInterval)
fmt.Println(" OverflowLimit: ", bucket.OverflowLimit)
}

0 comments on commit 6a7021d

Please sign in to comment.