From 182cc3d8030a41bc3da167bad92aac863ebd41de Mon Sep 17 00:00:00 2001 From: Jille Timmermans Date: Fri, 26 Jan 2024 12:11:26 +0100 Subject: [PATCH 1/2] Fix documentation of NewPool --- pool.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pool.go b/pool.go index c8edc0f..fd536e7 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") From 72b022bcfc5916386376e3ef57922eb249398b63 Mon Sep 17 00:00:00 2001 From: Jack Christensen Date: Fri, 1 Mar 2024 08:58:02 -0600 Subject: [PATCH 2/2] Update godoc link to v2 --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0ad07ec..fa82a9d 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -[![](https://godoc.org/github.com/jackc/puddle?status.svg)](https://godoc.org/github.com/jackc/puddle) +[![Go Reference](https://pkg.go.dev/badge/github.com/jackc/puddle/v2.svg)](https://pkg.go.dev/github.com/jackc/puddle/v2) ![Build Status](https://github.com/jackc/puddle/actions/workflows/ci.yml/badge.svg) # Puddle