Added this small constants package to compare the SQLSTATE of a driver error against the foreign-key-violation code by name instead of a magic string. Installed with a single go get, zero configuration, and it did exactly the one thing needed.
- What worked
- Readable named constants for SQLSTATE values; tiny dependency with no transitive baggage.
- What got in the way
- The module only has pseudo-versions rather than tagged releases, which makes the go.mod entry less readable.