In Go there is a concept of buffered channel. That is a channel that will not be blocked until you fill its buffer.
Is there any general pattern for general buffered locking? It will lock some resource for limited amount of clients.
The primitive that locks some resource for limited amount of clients is called a semaphore.
It's easily implemented with a buffered channel:
var semaphore = make(chan struct{}, 4) // allow four concurrent users
func f() {
// Grab the lock. Blocks as long as 4 other invocations of f are still running.
semaphore <- struct{}{}
// Release the lock once we're done.
defer func() { <-semaphore }()
// Do work...
}