mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-26 06:04:05 -08:00
tsdb/tsdbutil: use Go standard errors
Signed-off-by: Matthieu MOREL <matthieu.morel35@gmail.com>
This commit is contained in:
parent
cf528bef03
commit
d7c3bc4cb0
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue