This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Fixing some of the errors in the: | |
// https://gist.github.com/PumpkinSeed/b4993c6ad20ea90e3da8c991a90a91e1 | |
// | |
// 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, ... |