Our great sponsors
-
copygen
Go generator to copy values from type to type and fields from struct to struct (copier without reflection). Generate any code based on types.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
An alternative is to use a reflection based struct copier library or a codegen struct copier library
An alternative is to use a reflection based struct copier library or a codegen struct copier library
sqlc recently added support custom struct tags. You can read up on it here or check out one of the testdata files for reference
You can have methods on the SQLC structs. They just need to be in a separate file. See https://github.com/spotlightpa/almanack/blob/master/internal/db/page.go eg.