Files
2026-07-13 13:33:09 +08:00

15 lines
185 B
Go

package db
import (
"github.com/lib/pq"
)
func IsNonUniqueErr(err error) bool {
if err, ok := err.(*pq.Error); ok {
if err.Code == "23505" {
return true
}
}
return false
}