Skip to content

Commit

Permalink
chore: 整理
Browse files Browse the repository at this point in the history
  • Loading branch information
祝黄清 committed Oct 19, 2022
1 parent 6740c26 commit 41eee8d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mutex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func Test_RWLock(t *testing.T) {
})
}

func Test_MutexDo(t *testing.T) {
func Test_Do(t *testing.T) {
setupForTest()
errFun := func(err error) error {
if err != nil && err != ErrTryLockMaxNum {
Expand Down
6 changes: 2 additions & 4 deletions redis_locker.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ type Locker interface {
var (
writeFieldName = "_w_"
scripts = map[lockerMode]struct {
acquire string
release string
acquire, release string
}{
lockerModeRead: {
acquire: fmt.Sprintf(`
Expand Down Expand Up @@ -71,8 +70,7 @@ func NewRedisLockerBuilder(cmd redisson.Cmdable, opts ...Option) LockerBuilder {
func (b *redisLockerBuilder) Build() Locker { return b.locker }

type redisLockerScript struct {
acquire redisson.Scripter
release redisson.Scripter
acquire, release redisson.Scripter
}

type redisLocker struct {
Expand Down

0 comments on commit 41eee8d

Please sign in to comment.