Skip to content
New issue

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

v1.4 因为依赖包"github.com/bsm/redislock"更改导致go-admin-core/storage/locker/redis.go缺少参数 #43

Open
jingghe opened this issue Sep 9, 2022 · 3 comments

Comments

@jingghe
Copy link

jingghe commented Sep 9, 2022

因为github.com/bsm/redislock更新了Obtain方法增加了一个context.Context参数,而go-admin-core/storage/locker包没有更新,导致报错,具体错误如下:

vendor/github.com/go-admin-team/go-admin-core/storage/locker/redis.go:28:27: cannot use r.client (variable of type *"github.com/go-redis/redis/v7".Client) as type redislock.RedisClient in argument to redislock.New:
*"github.com/go-redis/redis/v7".Client does not implement redislock.RedisClient (wrong type for Eval method)
have Eval(script string, keys []string, args ...interface{}) *"github.com/go-redis/redis/v7".Cmd
want Eval(ctx context.Context, script string, keys []string, args ...interface{}) *"github.com/go-redis/redis/v9".Cmd
vendor/github.com/go-admin-team/go-admin-core/storage/locker/redis.go:30:61: not enough arguments in call to r.mutex.Obtain
have (string, time.Duration, *redislock.Options)
want (context.Context, string, time.Duration, *redislock.Options)

@daihu
Copy link

daihu commented Nov 24, 2022

现在依然有

@yyxhgy
Copy link

yyxhgy commented Aug 4, 2023

1.5.1也有啊,这都不修复的吗?

@Meepoljdx
Copy link

1.5.1也有啊,这都不修复的吗?

你自己引用项目的go.mod的github.com/bsm/redislock改成v0.8.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants