v1.4 因为依赖包"github.com/bsm/redislock"更改导致go-admin-core/storage/locker/redis.go缺少参数
Opened this issue · 3 comments
因为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)
现在依然有
1.5.1也有啊,这都不修复的吗?
1.5.1也有啊,这都不修复的吗?
你自己引用项目的go.mod的github.com/bsm/redislock改成v0.8.2