mirror of
https://github.com/tmrts/go-patterns.git
synced 2025-04-02 20:56:12 +03:00
fix: typo
This commit is contained in:
parent
f978e42036
commit
4f28a53474
2 changed files with 2 additions and 4 deletions
|
@ -36,7 +36,7 @@ const (
|
|||
)
|
||||
|
||||
type Builder interface {
|
||||
Color(Color) Builder
|
||||
Paint(Color) Builder
|
||||
Wheels(Wheels) Builder
|
||||
TopSpeed(Speed) Builder
|
||||
Build() Interface
|
||||
|
|
|
@ -7,7 +7,7 @@ A semaphore is a synchronization pattern/primitive that imposes mutual exclusion
|
|||
package semaphore
|
||||
|
||||
var (
|
||||
ErrNoTickets = errors.New("semaphore: could not aquire semaphore")
|
||||
ErrNoTickets = errors.New("semaphore: could not acquire semaphore")
|
||||
ErrIllegalRelease = errors.New("semaphore: can't release the semaphore without acquiring it first")
|
||||
)
|
||||
|
||||
|
@ -38,8 +38,6 @@ func (s *implementation) Release() error {
|
|||
case <-time.After(s.timeout):
|
||||
return ErrIllegalRelease
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func New(tickets int, timeout time.Duration) Interface {
|
||||
|
|
Loading…
Add table
Reference in a new issue