upgrade golangci to v2

* migrate configuration to version 2
* fix new lint warnings
* update lint.yaml to use golangci-lint-action v7
This commit is contained in:
Lawrence, Rendall
2025-04-22 14:18:18 +03:00
parent 750a76b756
commit 1a3f5b1598
7 changed files with 63 additions and 60 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ type BytePool struct {
// NewBytePool allocates a new BytePool with slices of equal length and capacity.
func NewBytePool(length int) *BytePool {
var bp BytePool
bp.Pool.New = func() any {
bp.New = func() any {
// This avoids allocations for the slice metadata, see:
// https://staticcheck.io/docs/checks#SA6002
b := make([]byte, length)