mirror of
https://github.com/kataras/iris.git
synced 2025-12-20 03:17:04 +00:00
reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker
Former-commit-id: ed635ee95de7160cde11eaabc0c1dcb0e460a620
This commit is contained in:
15
_examples/view/quicktemplate/controllers/index.go
Normal file
15
_examples/view/quicktemplate/controllers/index.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package controllers
|
||||
|
||||
import (
|
||||
"github.com/kataras/iris/v12/_examples/response-writer/quicktemplate/templates"
|
||||
|
||||
"github.com/kataras/iris/v12"
|
||||
)
|
||||
|
||||
// Index renders our ../templates/index.qtpl file using the compiled ../templates/index.qtpl.go file.
|
||||
func Index(ctx iris.Context) {
|
||||
tmpl := &templates.Index{}
|
||||
|
||||
// render the template
|
||||
ExecuteTemplate(ctx, tmpl)
|
||||
}
|
||||
Reference in New Issue
Block a user