From d1db25183a8996705fa6c5b1bfe9fda75cd5ecde Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?An=C4=B1l=20S=CC=A7enay?= Date: Wed, 8 May 2024 13:25:14 +0300 Subject: [PATCH] Add comment for postgresql docs reference --- error_translator.go | 1 + 1 file changed, 1 insertion(+) diff --git a/error_translator.go b/error_translator.go index f57db07..5f81350 100644 --- a/error_translator.go +++ b/error_translator.go @@ -8,6 +8,7 @@ import ( "github.com/jackc/pgx/v5/pgconn" ) +// The error codes to map PostgreSQL errors to gorm errors, here is the PostgreSQL error codes reference https://www.postgresql.org/docs/current/errcodes-appendix.html. var errCodes = map[string]error{ "23505": gorm.ErrDuplicatedKey, "23503": gorm.ErrForeignKeyViolated,