mirror of
https://github.com/kataras/iris.git
synced 2025-12-19 10:57:05 +00:00
Update to 8.2.5 | Say Hello to Controllers. Read HISTORY.md
Former-commit-id: 70f8619440497d132362da86c5187bcc57f8687b
This commit is contained in:
18
_examples/routing/mvc/controllers/index_go19.go
Normal file
18
_examples/routing/mvc/controllers/index_go19.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// +build go1.9
|
||||
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris"
|
||||
)
|
||||
|
||||
// Index is our index example controller.
|
||||
type Index struct {
|
||||
iris.Controller
|
||||
}
|
||||
|
||||
func (c *Index) Get() {
|
||||
c.Tmpl = "index.html"
|
||||
c.Data["title"] = "Index page"
|
||||
c.Data["message"] = "Hello world!"
|
||||
}
|
||||
Reference in New Issue
Block a user