aboutsummaryrefslogtreecommitdiff
path: root/internal/bufpool/buffers.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-02-21 20:55:37 +0800
committerGravatar Runxi Yu2026-02-21 20:55:37 +0800
commit2cb9c32187f0f14f38ab8124466f0ad17f77c5d0 (patch)
treed747cfe22f48a5c134906eb9efed99c471491be8 /internal/bufpool/buffers.go
parentinternal/zlib: Fix lints (diff)
signatureNo signature
*: Fix nosec
Diffstat (limited to 'internal/bufpool/buffers.go')
-rw-r--r--internal/bufpool/buffers.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/bufpool/buffers.go b/internal/bufpool/buffers.go
index 59e8ed48..19e3f80a 100644
--- a/internal/bufpool/buffers.go
+++ b/internal/bufpool/buffers.go
@@ -85,7 +85,7 @@ func Borrow(capHint int) Buffer {
*buf = make([]byte, 0, classCap)
}
slice := (*buf)[:0]
- return Buffer{buf: slice, pool: poolIndex(classIdx)} //#nosec:G115
+ return Buffer{buf: slice, pool: poolIndex(classIdx)} //#nosec G115
}
// FromOwned constructs a Buffer from a caller-owned byte slice. The resulting
@@ -167,7 +167,7 @@ func (buf *Buffer) ensureCapacity(needed int) {
buf.returnToPool()
buf.buf = newBuf
if pooled {
- buf.pool = poolIndex(classIdx) //#nosec:G115
+ buf.pool = poolIndex(classIdx) //#nosec G115
} else {
buf.pool = unpooled
}