docs: information about recommended minimum load
All checks were successful
CI / Makefile Lint (pull_request) Successful in 30s
CI / Markdown Lint (pull_request) Successful in 13s
CI / Go Lint (pull_request) Successful in 40s
CI / Unit Tests (pull_request) Successful in 27s
CI / Fuzz Tests (pull_request) Successful in 59s
CI / Mutation Tests (pull_request) Successful in 58s

This commit is contained in:
2026-03-24 20:59:04 -04:00
parent b499fa9c05
commit a815b49b66

View File

@@ -40,6 +40,9 @@ func Capacity(value int) Option {
// MinimumLoad modifies the [DefaultMinimumLoad] of the [Table]. The value must
// be between 0.00 and 1.00.
//
// The higher the minimum load, the more likely that a [Table.Put] will not
// succeed. Minimum loads above 20% are not tested.
func MinimumLoad(value float64) Option {
if value < 0.00 || value > 1.00 {
panic(fmt.Sprintf("go-cuckoo: MinimumLoad must be between 0.00 and 1.00, got %f", value))