We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b678606 commit d0ee324Copy full SHA for d0ee324
example_test.go
@@ -3,15 +3,16 @@ package fslock_test
3
import (
4
"errors"
5
"fmt"
6
+ "os"
7
- "github.com/ipfs/go-fs-lock"
8
+ fslock "github.com/ipfs/go-fs-lock"
9
)
10
11
func ExampleLockedError() {
- _, err := fslock.Lock("/tmp/", "foo.lock")
12
+ _, err := fslock.Lock(os.TempDir(), "foo.lock")
13
fmt.Println("locked:", errors.As(err, new(fslock.LockedError)))
14
- _, err = fslock.Lock("/tmp/", "foo.lock")
15
+ _, err = fslock.Lock(os.TempDir(), "foo.lock")
16
17
// Output:
18
// locked: false
0 commit comments