Skip to content

Commit

Permalink
Merge pull request redis#79 from VadimKulagin/master
Browse files Browse the repository at this point in the history
Fix some typos
  • Loading branch information
hjr265 authored Dec 7, 2021
2 parents 71321ce + 5f48754 commit 0569a24
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion error.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package redsync

import "errors"

// ErrFailed is the error resulting if Redsync fails to acquire the lock afer
// ErrFailed is the error resulting if Redsync fails to acquire the lock after
// exhausting all retries.
var ErrFailed = errors.New("redsync: failed to acquire lock")

Expand Down
4 changes: 2 additions & 2 deletions mutex.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ func (m *Mutex) ExtendContext(ctx context.Context) (bool, error) {
}

// Valid returns true if the lock acquired through m is still valid. It may
// also return true erroneously if qourum is achieved during the call and at
// also return true erroneously if quorum is achieved during the call and at
// least one node then takes long enough to respond for the lock to expire.
//
// Deprecated: Use Until instead. See https://github.com/go-redsync/redsync/issues/72.
Expand All @@ -137,7 +137,7 @@ func (m *Mutex) Valid() (bool, error) {
}

// ValidContext returns true if the lock acquired through m is still valid. It may
// also return true erroneously if qourum is achieved during the call and at
// also return true erroneously if quorum is achieved during the call and at
// least one node then takes long enough to respond for the lock to expire.
//
// Deprecated: Use Until instead. See https://github.com/go-redsync/redsync/issues/72.
Expand Down
3 changes: 2 additions & 1 deletion redsync.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ func WithGenValueFunc(genValueFunc func() (string, error)) Option {
})
}

// WithValue can be used to assign the random value without having to call lock. This allows the ownership of a lock to be "transfered" and allows the lock to be unlocked from elsewhere.
// WithValue can be used to assign the random value without having to call lock.
// This allows the ownership of a lock to be "transferred" and allows the lock to be unlocked from elsewhere.
func WithValue(v string) Option {
return OptionFunc(func(m *Mutex) {
m.value = v
Expand Down

0 comments on commit 0569a24

Please sign in to comment.