2
0

Merge remote-tracking branch 'upstream/master'

This commit is contained in:
2024-03-28 17:24:35 +03:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
[![](https://godoc.org/github.com/andoma-go/puddle?status.svg)](https://godoc.org/github.com/andoma-go/puddle)
[![Go Reference](https://pkg.go.dev/badge/github.com/andoma-go/puddle/v2.svg)](https://pkg.go.dev/github.com/andoma-go/puddle/v2)
![Build Status](https://github.com/andoma-go/puddle/actions/workflows/ci.yml/badge.svg)
# Puddle
+1 -1
View File
@@ -154,7 +154,7 @@ type Config[T any] struct {
MaxSize int32
}
// NewPool creates a new pool. Panics if maxSize is less than 1.
// NewPool creates a new pool. Returns an error iff MaxSize is less than 1.
func NewPool[T any](config *Config[T]) (*Pool[T], error) {
if config.MaxSize < 1 {
return nil, errors.New("MaxSize must be >= 1")