I'm new in golang and programming at all, so I've a problem with this function that supposed gets it all values from a table, but just shows me one. Thanks you all for your knowledge :)
func GetAll(w http.ResponseWriter, r *http.Request) {
results := map[string]interface{}{}
c, _ := connection.GetDB()
c.Table("products").Order("id_producto asc").Find(&results)
fmt.Print(results)
jsonString, _ := json.Marshal(results)
w.Header().Set("Content-Type", "application/json")
fmt.Fprint(w, string(jsonString))
}