Skip to content

Instantly share code, notes, and snippets.

Indribell / sql.go
Last active July 14, 2022 14:19
Extension for sql package
View sql.go
// Fixing some of the errors in the:
// 1. It was only able to extract database information, based upon a Struct.
// The code now can deal with a struct or a slice with structs.
// 2. The code relied on the json tag in the struct.
// You need to match the data with database fields, not the output fields.
// This will match up more 1 to 1 as you are in controle of your Database naming and selecting of that data.
// If a client expect different named exported json fields, ...