Skip to content

The only tool you need to know what is happening and how to fix it.

183 B
Raw Blame
//go:build !transactional_pg

package db

import "strings"

func IsUniqueViolation(err error) bool {
	return err != nil && strings.Contains(err.Error(), "UNIQUE constraint failed")
}