Former-commit-id: 8bdd9ba4d2a8ebb04d28fe03f2869269bae7b04e
This commit is contained in:
Gerasimos (Makis) Maropoulos 2017-03-09 15:35:09 +02:00
parent 10656e171d
commit 5667bfb9f0
2 changed files with 7 additions and 5 deletions

View File

@ -3,6 +3,7 @@
// templates/hi.html // templates/hi.html
// DO NOT EDIT! // DO NOT EDIT!
// NOTE: execute your own look main.go
package main package main
import ( import (
@ -83,7 +84,7 @@ func templatesHiHtml() (*asset, error) {
return nil, err return nil, err
} }
info := bindataFileInfo{name: "templates/hi.html", size: 106, mode: os.FileMode(438), modTime: time.Unix(1468907204, 0)} info := bindataFileInfo{name: "templates/hi.html", size: 106, mode: os.FileMode(438), modTime: time.Unix(1487682349, 0)}
a := &asset{bytes: bytes, info: info} a := &asset{bytes: bytes, info: info}
return a, nil return a, nil
} }
@ -184,8 +185,8 @@ type bintree struct {
} }
var _bintree = &bintree{nil, map[string]*bintree{ var _bintree = &bintree{nil, map[string]*bintree{
"templates": {nil, map[string]*bintree{ "templates": &bintree{nil, map[string]*bintree{
"hi.html": {templatesHiHtml, map[string]*bintree{}}, "hi.html": &bintree{templatesHiHtml, map[string]*bintree{}},
}}, }},
}} }}

View File

@ -11,10 +11,11 @@ func main() {
app.Adapt(iris.DevLogger()) app.Adapt(iris.DevLogger())
app.Adapt(httprouter.New()) app.Adapt(httprouter.New())
//$ go-bindata ./templates/... // $ go-bindata ./templates/...
// $ go build
// $ ./template_binary
// templates are not used, you can delete the folder and run the example // templates are not used, you can delete the folder and run the example
app.Adapt(view.HTML("./templates", ".html").Binary(Asset, AssetNames)) app.Adapt(view.HTML("./templates", ".html").Binary(Asset, AssetNames))
app.Get("/hi", hi) app.Get("/hi", hi)
app.Listen(":8080") app.Listen(":8080")
} }