mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
update ncruces/go-sqlite3 to v0.21.2 (#3626)
This commit is contained in:
13
vendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_other.go
generated
vendored
Normal file
13
vendor/github.com/ncruces/go-sqlite3/internal/dotlk/dotlk_other.go
generated
vendored
Normal file
@ -0,0 +1,13 @@
|
||||
//go:build !unix
|
||||
|
||||
package dotlk
|
||||
|
||||
import "os"
|
||||
|
||||
// TryLock returns nil if it acquired the lock,
|
||||
// fs.ErrExist if another process has the lock.
|
||||
func TryLock(name string) error {
|
||||
f, err := os.OpenFile(name, os.O_RDWR|os.O_CREATE|os.O_EXCL, 0666)
|
||||
f.Close()
|
||||
return err
|
||||
}
|
Reference in New Issue
Block a user