Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
allan-simon authored Jan 6, 2021
1 parent 996159d commit ab128e9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ import (
)

func main() {
_, err := singleinstance.CreateLockFile("plop.lock")
lockFile, err := singleinstance.CreateLockFile("plop.lock")
if err != nil {
fmt.Println("An instance already exists")
return
}
defer lockFile.Close()

fmt.Println("Sleeping...")
time.Sleep(30 * time.Second)
time.Sleep(10 * time.Second)
fmt.Println("Done")
}
```
Expand Down

0 comments on commit ab128e9

Please sign in to comment.