BUG: BFReserveArgs - error_rate & capacity (#2763)

the error_rate and capacity parameters should not be
optional - corrected
This commit is contained in:
Nic Gibson 2023-10-30 16:08:06 +00:00 committed by GitHub
parent 343016bf72
commit 84f46c3301
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 6 deletions

View File

@ -150,12 +150,7 @@ func (c cmdable) BFReserveNonScaling(ctx context.Context, key string, errorRate
func (c cmdable) BFReserveWithArgs(ctx context.Context, key string, options *BFReserveOptions) *StatusCmd {
args := []interface{}{"BF.RESERVE", key}
if options != nil {
if options.Error != 0 {
args = append(args, options.Error)
}
if options.Capacity != 0 {
args = append(args, options.Capacity)
}
args = append(args, options.Error, options.Capacity)
if options.Expansion != 0 {
args = append(args, "EXPANSION", options.Expansion)
}