mirror of
https://github.com/sot-tech/mochi.git
synced 2026-07-18 22:28:10 -07:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user