1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-17 18:07:01 +00:00
Former-commit-id: 3be90d3099bfd9eabebd299dc08f9d6c1e6c2a29
This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-05-16 01:00:51 +03:00
parent ad74d7b935
commit 44eafe739b
10 changed files with 11 additions and 11 deletions

View File

@@ -97,7 +97,7 @@ type MeController struct {
CurrentUserID Authenticated
}
// Get returns a message for the shake of the example.
// Get returns a message for the sake of the example.
// GET: /user
func (c *MeController) Get() string {
return "This will be executed only when the user is logged in"

View File

@@ -10,7 +10,7 @@ import (
// Keep note that the tags for public-use (for our web app)
// should be kept in other file like "web/viewmodels/user.go"
// which could wrap by embedding the datamodels.User or
// define completely new fields instead but for the shake
// define completely new fields instead but for the sake
// of the example, we will use this datamodel
// as the only one User model in our application.
type User struct {

View File

@@ -21,10 +21,10 @@ const (
MySQL
)
// LoadUsers returns all users(empty map) from the memory, for the shake of simplicty.
// LoadUsers returns all users(empty map) from the memory, for the sake of simplicty.
func LoadUsers(engine Engine) (map[int64]datamodels.User, error) {
if engine != Memory {
return nil, errors.New("for the shake of simplicity we're using a simple map as the data source")
return nil, errors.New("for the sake of simplicity we're using a simple map as the data source")
}
return make(map[int64]datamodels.User), nil

View File

@@ -8,7 +8,7 @@ package datamodels
// which could wrap by embedding the datamodels.Movie or
// declare new fields instead butwe will use this datamodel
// as the only one Movie model in our application,
// for the shake of simplicty.
// for the sake of simplicty.
type Movie struct {
ID int64 `json:"id"`
Name string `json:"name"`