forked from mirror/redis
chore: remove outdated comment
This commit is contained in:
parent
d7dd9a732d
commit
1de0d2a1b7
10
commands.go
10
commands.go
|
@ -1743,8 +1743,6 @@ type XAddArgs struct {
|
|||
Values interface{}
|
||||
}
|
||||
|
||||
// XAdd a.Limit has a bug, please confirm it and use it.
|
||||
// issue: https://github.com/redis/redis/issues/9046
|
||||
func (c cmdable) XAdd(ctx context.Context, a *XAddArgs) *StringCmd {
|
||||
args := make([]interface{}, 0, 11)
|
||||
args = append(args, "xadd", a.Stream)
|
||||
|
@ -2081,22 +2079,14 @@ func (c cmdable) XTrimMaxLen(ctx context.Context, key string, maxLen int64) *Int
|
|||
return c.xTrim(ctx, key, "maxlen", false, maxLen, 0)
|
||||
}
|
||||
|
||||
// XTrimMaxLenApprox LIMIT has a bug, please confirm it and use it.
|
||||
// issue: https://github.com/redis/redis/issues/9046
|
||||
// cmd: XTRIM key MAXLEN ~ maxLen LIMIT limit
|
||||
func (c cmdable) XTrimMaxLenApprox(ctx context.Context, key string, maxLen, limit int64) *IntCmd {
|
||||
return c.xTrim(ctx, key, "maxlen", true, maxLen, limit)
|
||||
}
|
||||
|
||||
// XTrimMinID No `~` rules are used, `limit` cannot be used.
|
||||
// cmd: XTRIM key MINID minID
|
||||
func (c cmdable) XTrimMinID(ctx context.Context, key string, minID string) *IntCmd {
|
||||
return c.xTrim(ctx, key, "minid", false, minID, 0)
|
||||
}
|
||||
|
||||
// XTrimMinIDApprox LIMIT has a bug, please confirm it and use it.
|
||||
// issue: https://github.com/redis/redis/issues/9046
|
||||
// cmd: XTRIM key MINID ~ minID LIMIT limit
|
||||
func (c cmdable) XTrimMinIDApprox(ctx context.Context, key string, minID string, limit int64) *IntCmd {
|
||||
return c.xTrim(ctx, key, "minid", true, minID, limit)
|
||||
}
|
||||
|
|
|
@ -4381,9 +4381,6 @@ var _ = Describe("Commands", func() {
|
|||
Expect(id).To(Equal("3-0"))
|
||||
})
|
||||
|
||||
// TODO XTrimMaxLenApprox/XTrimMinIDApprox There is a bug in the limit parameter.
|
||||
// TODO Don't test it for now.
|
||||
// TODO link: https://github.com/redis/redis/issues/9046
|
||||
It("should XTrimMaxLen", func() {
|
||||
n, err := client.XTrimMaxLen(ctx, "stream", 0).Result()
|
||||
Expect(err).NotTo(HaveOccurred())
|
||||
|
@ -4425,9 +4422,6 @@ var _ = Describe("Commands", func() {
|
|||
}))
|
||||
})
|
||||
|
||||
// TODO XAdd There is a bug in the limit parameter.
|
||||
// TODO Don't test it for now.
|
||||
// TODO link: https://github.com/redis/redis/issues/9046
|
||||
It("should XAdd with MaxLen", func() {
|
||||
id, err := client.XAdd(ctx, &redis.XAddArgs{
|
||||
Stream: "stream",
|
||||
|
|
Loading…
Reference in New Issue