package
0.0.0-20231014214933-bf83fb330073
Repository: https://github.com/skyrin/go-lib.git
Documentation: pkg.go.dev
# Functions
AsExtendedError helper function that returns the error as an ExtendedError if it is one.
ContainsError checks if the error contains the specified error message.
IsAnyPQError checks if the passed error is a Postgres error.
IsNoRowsPQError returns whether the error is a pg sql no rows found.
IsPQError checks if the passed error is the specified Postgres error code.
NewErr returns an error with the friendly user message from an ExtendedError, so it doesn't get logged.
Wrap checks if the passed error has been wrapped before by this func and either wraps the original error as an ExtendedError or adds the debug message to the already existing ExtendedError's InnerError.
# Constants
No description provided by the author
PQErr23505UniqueViolation Postgres code for unique violation.
PQErr42P01 pq: relation "<string>" does not exist.
PQErr58030IOError Postgres code for i/o error ("could not write to temporary file").
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
CustomExtendedError is the custom error object.
# Structs
ExtendedError is our custom error.