mirror of
https://github.com/kataras/iris.git
synced 2025-01-24 03:01:03 +01:00
07046ab978
Former-commit-id: 037081db5d6d4434e873ca8b75334ee43e046b6a
30 lines
602 B
Go
30 lines
602 B
Go
package controllers
|
|
|
|
import "github.com/kataras/iris/mvc"
|
|
|
|
type HomeController struct{}
|
|
|
|
func (c *HomeController) Get() mvc.Result {
|
|
return mvc.View{Name: "index.html"}
|
|
}
|
|
|
|
func (c *HomeController) GetAbout() mvc.Result {
|
|
return mvc.View{
|
|
Name: "about.html",
|
|
Data: map[string]interface{}{
|
|
"Title": "About Page",
|
|
"Message": "Your application description page.",
|
|
},
|
|
}
|
|
}
|
|
|
|
func (c *HomeController) GetContact() mvc.Result {
|
|
return mvc.View{
|
|
Name: "contact.html",
|
|
Data: map[string]interface{}{
|
|
"Title": "Contact Page",
|
|
"Message": "Your application description page.",
|
|
},
|
|
}
|
|
}
|