Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ErrorCode ¶
ErrorCode extracts the error code from the given error returned by a database operation. It uses reflection to get the value of the `Code` field in order to avoid having to import the `lib/pq` and `pgx` packages. It returns an empty string if the passed error is nil or it hasn't the `Code` field.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.