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
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