I have difficulty querieing for users, which is defined as:
type User struct {
ID int `db:\"id\" json:\"id\"`
UserName st
In my case, I had a similar problem but for my particular usecase, it was a struct with a select which didn't work, since I only needed to select data, then I proceeded to simply:
change the data type from time.Time
to string
This solved my problem, and I was able to get the data from the database. So perhaps it is not the best solution, but this is what worked for me.
Mr Karlom's solution also worked for me, this is just an alternative method.