go/sqliteutil/errors.go

9 lines
155 B
Go
Raw Normal View History

2024-11-17 14:18:05 +00:00
package sqliteutil
import "github.com/mattn/go-sqlite3"
func ErrIsDuplicate(err error) bool {
e, ok := err.(sqlite3.Error)
return ok && e.Code == 19
}