WithGenValueFunc can be used to set the custom value generator.
(genValueFunc func() (string, error))
| 125 | |
| 126 | // WithGenValueFunc can be used to set the custom value generator. |
| 127 | func WithGenValueFunc(genValueFunc func() (string, error)) Option { |
| 128 | return OptionFunc(func(m *Mutex) { |
| 129 | m.genValueFunc = genValueFunc |
| 130 | }) |
| 131 | } |
| 132 | |
| 133 | // WithValue can be used to assign the random value without having to call lock. |
| 134 | // This allows the ownership of a lock to be "transferred" and allows the lock to be unlocked from elsewhere. |
nothing calls this directly
no test coverage detected
searching dependent graphs…