Merge pull request #13143 from mmorel-35/patch-3

tsdb/tsdbutil: use Go standard errors
This commit is contained in:
Julien Pivotto 2023-11-17 10:23:04 +01:00 committed by GitHub
commit 1b84c01b76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -14,13 +14,13 @@
package tsdbutil package tsdbutil
import ( import (
"errors"
"fmt" "fmt"
"os" "os"
"path/filepath" "path/filepath"
"github.com/go-kit/log" "github.com/go-kit/log"
"github.com/go-kit/log/level" "github.com/go-kit/log/level"
"github.com/pkg/errors"
"github.com/prometheus/client_golang/prometheus" "github.com/prometheus/client_golang/prometheus"
tsdb_errors "github.com/prometheus/prometheus/tsdb/errors" tsdb_errors "github.com/prometheus/prometheus/tsdb/errors"
@ -83,7 +83,7 @@ func (l *DirLocker) Lock() error {
lockf, _, err := fileutil.Flock(l.path) lockf, _, err := fileutil.Flock(l.path)
if err != nil { if err != nil {
return errors.Wrap(err, "lock DB directory") return fmt.Errorf("lock DB directory: %w", err)
} }
l.releaser = lockf l.releaser = lockf
return nil return nil