Merge pull request #13130 from mmorel-35/patch-6

tsdb/encoding: use Go standard errors package
This commit is contained in:
Julien Pivotto 2023-11-14 00:51:47 +01:00 committed by GitHub
commit 7bcae56b6e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,13 +15,14 @@ package encoding
import (
"encoding/binary"
"errors"
"fmt"
"hash"
"hash/crc32"
"math"
"unsafe"
"github.com/dennwc/varint"
"github.com/pkg/errors"
)
var (
@ -153,7 +154,7 @@ func NewDecbufUvarintAt(bs ByteSlice, off int, castagnoliTable *crc32.Table) Dec
l, n := varint.Uvarint(b)
if n <= 0 || n > binary.MaxVarintLen32 {
return Decbuf{E: errors.Errorf("invalid uvarint %d", n)}
return Decbuf{E: fmt.Errorf("invalid uvarint %d", n)}
}
if bs.Len() < off+n+int(l)+4 {