Skip to content

Commit 14b474c

Browse files
authored
Merge pull request #15 from ipfs/chore/cleanup
chore: remove xerrors
2 parents 3f12a5e + 19ca55e commit 14b474c

File tree

3 files changed

+248
-26
lines changed

3 files changed

+248
-26
lines changed

fslock.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package fslock
22

33
import (
4+
"errors"
45
"io"
56
"os"
67
"path/filepath"
@@ -10,7 +11,6 @@ import (
1011
util "github.com/ipfs/go-ipfs-util"
1112
logging "github.com/ipfs/go-log"
1213
lock "go4.org/lock"
13-
"golang.org/x/xerrors"
1414
)
1515

1616
// log is the fsrepo logger
@@ -78,7 +78,7 @@ func Locked(confdir, lockFile string) (bool, error) {
7878

7979
log.Debug(err)
8080

81-
if xerrors.As(err, new(LockedError)) {
81+
if errors.As(err, new(LockedError)) {
8282
return true, nil
8383
}
8484
return false, err

go.mod

+3-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@ module github.com/ipfs/go-fs-lock
22

33
require (
44
github.com/ipfs/go-ipfs-util v0.0.1
5-
github.com/ipfs/go-log v1.0.2
6-
go4.org v0.0.0-20200104003542-c7e774b10ea0
7-
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
5+
github.com/ipfs/go-log v1.0.4
6+
go4.org v0.0.0-20200411211856-f5505b9728dd
87
)
98

10-
go 1.12
9+
go 1.13

0 commit comments

Comments
 (0)