13 lines
219 B
Go
13 lines
219 B
Go
package repositories
|
|
|
|
import (
|
|
"context"
|
|
"time"
|
|
)
|
|
|
|
const queryTimeout = 5 * time.Second
|
|
|
|
func boundedQuery(ctx context.Context) (context.Context, context.CancelFunc) {
|
|
return context.WithTimeout(ctx, queryTimeout)
|
|
}
|