g.GET(\"/\", func(c echo.Context) error { var users []models.User err := db.Find(users).Error if err != nil { fmt.Println(err) } return c.JSO
You have to call Find with a pointer to the slice.
err := db.Find(&users).Error
relevant Gorm documentation: http://jinzhu.me/gorm/crud.html#query