This commit is contained in:
jdl
2024-11-17 15:18:05 +01:00
parent 84bc5e48e8
commit 5d442fa681
3 changed files with 10 additions and 2 deletions

8
sqliteutil/errors.go Normal file
View File

@@ -0,0 +1,8 @@
package sqliteutil
import "github.com/mattn/go-sqlite3"
func ErrIsDuplicate(err error) bool {
e, ok := err.(sqlite3.Error)
return ok && e.Code == 19
}