diff --git a/README.md b/README.md index 4f5f3ef..7f0a118 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/pool.go b/pool.go index aa183b0..dde8cf0 100644 --- a/pool.go +++ b/pool.go @@ -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")