From 71330963c080960f2f398fcd711a1fa14f68d503 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Thu, 11 Mar 2021 22:34:45 +0800 Subject: [PATCH] internal/poll: fix some grammar errors Change-Id: I25a6424bce9d372fa46e8bdd856095845d3397bf Reviewed-on: https://go-review.googlesource.com/c/go/+/300889 Reviewed-by: Ian Lance Taylor Reviewed-by: Emmanuel Odeke Run-TryBot: Ian Lance Taylor TryBot-Result: Go Bot --- src/internal/poll/splice_linux.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/internal/poll/splice_linux.go b/src/internal/poll/splice_linux.go index 971f754f43..49350b1ddc 100644 --- a/src/internal/poll/splice_linux.go +++ b/src/internal/poll/splice_linux.go @@ -160,9 +160,9 @@ type splicePipe struct { data int } -// splicePipePool caches pipes to avoid high frequency construction and destruction of pipe buffers. -// The garbage collector will free all pipes in the sync.Pool in periodically, thus we need to set up -// a finalizer for each pipe to close the its file descriptors before the actual GC. +// splicePipePool caches pipes to avoid high-frequency construction and destruction of pipe buffers. +// The garbage collector will free all pipes in the sync.Pool periodically, thus we need to set up +// a finalizer for each pipe to close its file descriptors before the actual GC. var splicePipePool = sync.Pool{New: newPoolPipe} func newPoolPipe() interface{} { @@ -175,10 +175,10 @@ func newPoolPipe() interface{} { return p } -// getPipe tries to acquire a pipe buffer from the pool or create a new one with newPipe() if it gets nil from cache. +// getPipe tries to acquire a pipe buffer from the pool or create a new one with newPipe() if it gets nil from the cache. // // Note that it may fail to create a new pipe buffer by newPipe(), in which case getPipe() will return a generic error -// and system call name splice in string as the indication. +// and system call name splice in a string as the indication. func getPipe() (*splicePipe, string, error) { v := splicePipePool.Get() if v == nil { -- 2.50.0