Create a Map in Golang from database Rows

后端 未结 5 2044
别那么骄傲
别那么骄傲 2020-12-14 07:14

Basically after doing a query I\'d like to take the resulting rows and produce a []map[string]interface{}, but I do not see how to do this with the API since th

5条回答
  •  时光说笑
    2020-12-14 08:10

    If you really wan't a map, which is needed in some cases, have a look at dbr, but you need to use the fork (since the pr got rejected in the original repo). The fork seems more up to date anyway:

    https://github.com/mailru/dbr

    For info on how to use it:

    https://github.com/gocraft/dbr/issues/83

提交回复
热议问题