From b78b33a5d2f7d414c81d675d209c0c706cf64418 Mon Sep 17 00:00:00 2001 From: Rueian Date: Sun, 22 Dec 2019 13:01:55 +0800 Subject: [PATCH] doc(bufferpool): add a nocopy comment to sync.Pool field --- buffer/pool.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buffer/pool.go b/buffer/pool.go index 3e7d2b62..3265283f 100644 --- a/buffer/pool.go +++ b/buffer/pool.go @@ -5,6 +5,8 @@ import ( ) type Pool struct { + // A Pool must not be copied after first use. + // https://golang.org/pkg/sync/#Pool buffers sync.Pool }