mirror of https://github.com/go-redis/redis.git
BUG: BFReserveArgs - error_rate & capacity (#2763)
the error_rate and capacity parameters should not be optional - corrected
This commit is contained in:
parent
343016bf72
commit
84f46c3301
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue