Merge remote-tracking branch 'upstream/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
[](https://godoc.org/github.com/andoma-go/puddle)
|
[](https://pkg.go.dev/github.com/andoma-go/puddle/v2)
|
||||||

|

|
||||||
|
|
||||||
# Puddle
|
# Puddle
|
||||||
|
|||||||
@@ -154,7 +154,7 @@ type Config[T any] struct {
|
|||||||
MaxSize int32
|
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) {
|
func NewPool[T any](config *Config[T]) (*Pool[T], error) {
|
||||||
if config.MaxSize < 1 {
|
if config.MaxSize < 1 {
|
||||||
return nil, errors.New("MaxSize must be >= 1")
|
return nil, errors.New("MaxSize must be >= 1")
|
||||||
|
|||||||
Reference in New Issue
Block a user