mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
replace ioutil with io package and other minor improvements
This commit is contained in:
@@ -30,14 +30,16 @@ type UsersController struct {
|
||||
// curl -i -u admin:password http://localhost:8080/users
|
||||
//
|
||||
// The correct way if you have sensitive data:
|
||||
// func (c *UsersController) Get() (results []viewmodels.User) {
|
||||
// data := c.Service.GetAll()
|
||||
//
|
||||
// for _, user := range data {
|
||||
// results = append(results, viewmodels.User{user})
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
// func (c *UsersController) Get() (results []viewmodels.User) {
|
||||
// data := c.Service.GetAll()
|
||||
//
|
||||
// for _, user := range data {
|
||||
// results = append(results, viewmodels.User{user})
|
||||
// }
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// otherwise just return the datamodels.
|
||||
func (c *UsersController) Get() (results []datamodels.User) {
|
||||
return c.Service.GetAll()
|
||||
|
||||
Reference in New Issue
Block a user