func New(tickets int, timeout time.Duration) *Semaphore {
	return &Semaphore{
		sem:     make(chan struct{}, tickets),
		timeout: timeout,
	}
}
New constructs a new Semaphore with the given ticket-count
and timeout.
package semaphore
import (
	"errors"
	"time"
)
var ErrNoTickets = errors.New("could not acquire semaphore ticket")
type Semaphore struct {
	sem     chan struct{}
	timeout time.Duration
}