Browse Source

tsdb/tsdbutil: use Go standard errors

Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
pull/13143/head
Matthieu MOREL 1 year ago committed by GitHub
parent
commit
d7c3bc4cb0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      tsdb/tsdbutil/dir_locker.go

4
tsdb/tsdbutil/dir_locker.go

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

Loading…
Cancel
Save