From eb1affd5da505b3a35bb021224612f0a0fca2c9a Mon Sep 17 00:00:00 2001 From: yyforyongyu Date: Thu, 26 Nov 2020 09:47:01 +0800 Subject: [PATCH] pool: fix typo --- pool/read_buffer.go | 2 +- pool/write.go | 2 +- pool/write_buffer.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pool/read_buffer.go b/pool/read_buffer.go index 58f6014ed..ded81aa66 100644 --- a/pool/read_buffer.go +++ b/pool/read_buffer.go @@ -26,7 +26,7 @@ type ReadBuffer struct { } // NewReadBuffer returns a freshly instantiated ReadBuffer, using the given -// gcInterval and expieryInterval. +// gcInterval and expiryInterval. func NewReadBuffer(gcInterval, expiryInterval time.Duration) *ReadBuffer { return &ReadBuffer{ pool: NewRecycle( diff --git a/pool/write.go b/pool/write.go index 9c650a56e..ac335f264 100644 --- a/pool/write.go +++ b/pool/write.go @@ -86,7 +86,7 @@ func (w *Write) newWorkerState() WorkerState { } // Cleanup returns the writeBuf to the underlying buffer pool, and removes the -// goroutine's reference to the readBuf and encapsulating buf. +// goroutine's reference to the writeBuf and encapsulating buf. func (w *writeWorkerState) Cleanup() { w.bufferPool.Return(w.writeBuf) w.writeBuf = nil diff --git a/pool/write_buffer.go b/pool/write_buffer.go index dfcfd9f08..4b1339769 100644 --- a/pool/write_buffer.go +++ b/pool/write_buffer.go @@ -13,7 +13,7 @@ const ( DefaultWriteBufferGCInterval = 15 * time.Second // DefaultWriteBufferExpiryInterval is the default, minimum interval - // that must elapse before a Write will release a buffer.Write. The + // that must elapse before a Write will release a buffer.Write. The // maximum time before the buffer can be released is equal to the expiry // interval plus the gc interval. DefaultWriteBufferExpiryInterval = 30 * time.Second