We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
bitpos
bit
byte
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I expect bitpos to take start and end prefixes as bits and as bytes
The interface does not allow to give the last argument bit or byte
Change the interface to support bit and byte. i.e. with
diff --git a/commands.go b/commands.go index ac93f39..03a3030 100644 --- a/commands.go +++ b/commands.go @@ -192,7 +192,7 @@ type Cmdable interface { BitOpOr(ctx context.Context, destKey string, keys ...string) *IntCmd BitOpXor(ctx context.Context, destKey string, keys ...string) *IntCmd BitOpNot(ctx context.Context, destKey string, key string) *IntCmd - BitPos(ctx context.Context, key string, bit int64, pos ...int64) *IntCmd + BitPos(ctx context.Context, key string, args ...interface{}) *IntCmd BitField(ctx context.Context, key string, args ...interface{}) *IntSliceCmd
Below is the syntax using redis-cli:
$ redis-cli 127.0.0.1:6379> Set mykey '\xff\xf0\x00' OK 127.0.0.1:6379> bitpos mykey 0 0 2 byte (integer) 0 127.0.0.1:6379> bitpos mykey 0 0 2 bit (integer) 0 127.0.0.1:6379>
My code is more complex then it needs to be because offsets in bits are not supported.
The text was updated successfully, but these errors were encountered:
fix by #2498
Sorry, something went wrong.
thank you for the quick patch!
Successfully merging a pull request may close this issue.
Expected Behavior
I expect bitpos to take start and end prefixes as bits and as bytes
Current Behavior
The interface does not allow to give the last argument
bit
orbyte
Possible Solution
Change the interface to support bit and byte. i.e. with
Steps to Reproduce
Below is the syntax using redis-cli:
Context (Environment)
My code is more complex then it needs to be because offsets in bits are not supported.
The text was updated successfully, but these errors were encountered: