Skip to content

Support for pkg/errors? #668

Answered by kyleconroy
alecbz asked this question in General
Discussion options

You must be logged in to vote

I'm happy to add a configuration option for using "pkg/errors". There's a large number of configuration options, but I want to make sure that sqlc is flexible enough to fit into existing code bases.

Before we do that though, have you looked at a package like https://github.com/ngrok/sqlmw? It may offer the right hooks for using pkg/errors and adding OpenCensus tracing without changing any of the code generated by sqlc.

Long term, I'm less excited about templates. xo/xo uses templates, and I think the interface, while powerful, is really complex. If you take a look at the templates we use to generate the Go code, they aren't pretty to look at. The bigger issue is designing the API that the…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by kyleconroy
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #668 on August 21, 2020 20:59.