2
0

Fix documentation of NewPool

This commit is contained in:
Jille Timmermans
2024-01-26 12:11:26 +01:00
committed by Jack Christensen
parent 825ae07315
commit 182cc3d803
+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")