update ncruces/go-sqlite3 to v0.21.2 (#3626)

This commit is contained in:
kim
2024-12-17 23:16:20 +00:00
committed by GitHub
parent 9697df0955
commit c953f57e55
14 changed files with 203 additions and 46 deletions

View 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
}