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
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:
@@ -40,6 +40,9 @@ func Capacity(value int) Option {
|
|||||||
|
|
||||||
// MinimumLoad modifies the [DefaultMinimumLoad] of the [Table]. The value must
|
// MinimumLoad modifies the [DefaultMinimumLoad] of the [Table]. The value must
|
||||||
// be between 0.00 and 1.00.
|
// 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 {
|
func MinimumLoad(value float64) Option {
|
||||||
if value < 0.00 || value > 1.00 {
|
if value < 0.00 || value > 1.00 {
|
||||||
panic(fmt.Sprintf("go-cuckoo: MinimumLoad must be between 0.00 and 1.00, got %f", value))
|
panic(fmt.Sprintf("go-cuckoo: MinimumLoad must be between 0.00 and 1.00, got %f", value))
|
||||||
|
|||||||
Reference in New Issue
Block a user