diff --git a/README.md b/README.md index b7bcb775..b39654be 100644 --- a/README.md +++ b/README.md @@ -471,7 +471,7 @@ type Movie struct { // simple checks can be added here. // // It's just a showcase, -// imagine what possible this opens when you designing a bigger application. +// imagine the potentials this feature gives when designing a bigger application. // // This is called where the return value from a controller's method functions // is type of `Movie`. @@ -700,7 +700,7 @@ func (s *MovieMemoryService) GetAll() []models.Movie { ```go -// file: controllers/movies_controller.go +// file: controllers/movie_controller.go package controllers @@ -770,7 +770,6 @@ func (c *MovieController) PutBy(id int64) (models.Movie, error) { // Demo: // curl -i -X DELETE -u admin:password http://localhost:8080/movies/1 func (c *MovieController) DeleteBy(id int64) interface{} { - // delete the entry from the movies slice. wasDel := c.Service.DeleteByID(id) if wasDel { // and return the deleted movie's ID diff --git a/_examples/mvc/using-method-result/controllers/movie_controller.go b/_examples/mvc/using-method-result/controllers/movie_controller.go index 4ed5fc6a..7f3265ed 100644 --- a/_examples/mvc/using-method-result/controllers/movie_controller.go +++ b/_examples/mvc/using-method-result/controllers/movie_controller.go @@ -1,4 +1,4 @@ -// file: controllers/movies_controller.go +// file: controllers/movie_controller.go package controllers @@ -68,13 +68,12 @@ func (c *MovieController) PutBy(id int64) (models.Movie, error) { // Demo: // curl -i -X DELETE -u admin:password http://localhost:8080/movies/1 func (c *MovieController) DeleteBy(id int64) interface{} { - // delete the entry from the movies slice. wasDel := c.Service.DeleteByID(id) if wasDel { - // and return the deleted movie's ID + // return the deleted movie's ID return iris.Map{"deleted": id} } - // here we can see that a method function can return any of those two types(map or int), + // right here we can see that a method function can return any of those two types(map or int), // we don't have to specify the return type to a specific type. return iris.StatusBadRequest } diff --git a/_examples/mvc/using-method-result/main.go b/_examples/mvc/using-method-result/main.go index 1675db8a..f571fbed 100644 --- a/_examples/mvc/using-method-result/main.go +++ b/_examples/mvc/using-method-result/main.go @@ -20,7 +20,7 @@ func main() { // Register our controllers. app.Controller("/hello", new(controllers.HelloController)) - // Create our movie service (memory), we will bind it to the movies controller. + // Create our movie service (memory), we will bind it to the movie controller. service := services.NewMovieServiceFromMemory(datasource.Movies) app.Controller("/movies", new(controllers.MovieController), diff --git a/_examples/mvc/using-method-result/models/movie.go b/_examples/mvc/using-method-result/models/movie.go index 86ce3a69..8f0fb678 100644 --- a/_examples/mvc/using-method-result/models/movie.go +++ b/_examples/mvc/using-method-result/models/movie.go @@ -24,7 +24,7 @@ type Movie struct { // simple checks can be added here. // // It's just a showcase, -// imagine what possible this opens when you designing a bigger application. +// imagine the potentials this feature gives when designing a bigger application. // // This is called where the return value from a controller's method functions // is type of `Movie`. diff --git a/faq.md b/faq.md index 858eb3d3..26c0bcf1 100644 --- a/faq.md +++ b/faq.md @@ -55,7 +55,7 @@ You can find all type aliases and their original package import statements at th Iris may have reached version 8, but we're not stopping there. We have many feature ideas on our board that we're anxious to add and other innovative web development solutions that we're planning to build into Iris. -## Can I found a job if I learn how to use Iris? +## Can I find a job if I learn how to use Iris? Yes, not only because you will learn Golang in the same time, but there are some positions open for Iris-specific developers the time we speak. @@ -78,6 +78,4 @@ https://github.com/kataras/iris/issues/646 By normal people like you, who help us by donating small or larger amounts of money. -Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras)! - -[![](https://www.paypalobjects.com/webstatic/paypalme/images/pp_logo_small.png)](https://www.paypal.me/kataras) \ No newline at end of file +Help this project to continue deliver awesome and unique features with the higher code quality as possible by donating any amount via [PayPal](https://www.paypal.me/kataras)! \ No newline at end of file diff --git a/mvc/activator/binder.go b/mvc/activator/binder.go index 83bfb803..aa6916fa 100644 --- a/mvc/activator/binder.go +++ b/mvc/activator/binder.go @@ -71,10 +71,10 @@ func (b *binder) lookup(elem reflect.Type) (fields []field.Field) { matcher := func(elemField reflect.StructField) bool { // If the controller's field is interface then check // if the given binded value implements that interface. - // i.e MovieController { service services.MoviesController /* interface */ } + // i.e MovieController { Service services.MoviesController /* interface */ } // app.Controller("/", new(MovieController), - // services.NewMovieMemoryController(...)) - // *MovieMemoryService type + // services.NewMovieMemoryService(...)) + // services.NewMovieMemoryService returns a *MovieMemoryService // that implements the MovieService interface. if elemField.Type.Kind() == reflect.Interface { return value.Type().Implements(elemField.Type)