diff --git a/.golangci.yml b/.golangci.yml index c484d0be5941..5dbb659483ef 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -46,6 +46,7 @@ linters: - gosec - inamedparam - interfacebloat + - intrange - ireturn - lll - maintidx diff --git a/encoding/bytesutil/bytes.go b/encoding/bytesutil/bytes.go index 19f56a03e5c1..7dbd6f5609d8 100644 --- a/encoding/bytesutil/bytes.go +++ b/encoding/bytesutil/bytes.go @@ -141,7 +141,7 @@ func PadTo(b []byte, size int) []byte { func ReverseByteOrder(input []byte) []byte { b := make([]byte, len(input)) copy(b, input) - for i := range len(b) / 2 { + for i := 0; i < len(b)/2; i++ { b[i], b[len(b)-i-1] = b[len(b)-i-1], b[i] } return b