mirror of
https://github.com/kataras/iris.git
synced 2025-02-02 15:30:36 +01:00
gofmt
Former-commit-id: 75992b3aeae2228a7a7f0e698ce78b2f323cc33a
This commit is contained in:
parent
3dc3fa10ee
commit
d451335aa2
|
@ -11,7 +11,7 @@ func main() {
|
||||||
// TIP: append .Reload(true) to reload the templates on each request.
|
// TIP: append .Reload(true) to reload the templates on each request.
|
||||||
|
|
||||||
app.Get("/home", func(ctx iris.Context) {
|
app.Get("/home", func(ctx iris.Context) {
|
||||||
ctx.ViewData("title", "Home page");
|
ctx.ViewData("title", "Home page")
|
||||||
ctx.View("home.html")
|
ctx.View("home.html")
|
||||||
// Note that: you can pass "layout" : "otherLayout.html" to bypass the config's Layout property
|
// Note that: you can pass "layout" : "otherLayout.html" to bypass the config's Layout property
|
||||||
// or view.NoLayout to disable layout on this render action.
|
// or view.NoLayout to disable layout on this render action.
|
||||||
|
|
|
@ -27,8 +27,8 @@ func main() {
|
||||||
app.RegisterView(iris.HTML("./templates", ".html")) // select the html engine to serve templates
|
app.RegisterView(iris.HTML("./templates", ".html")) // select the html engine to serve templates
|
||||||
|
|
||||||
ws := websocket.New(websocket.Config{
|
ws := websocket.New(websocket.Config{
|
||||||
// to enable binary messages (useful for protobuf):
|
// to enable binary messages (useful for protobuf):
|
||||||
// BinaryMessages: true,
|
// BinaryMessages: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
// register the server on an endpoint.
|
// register the server on an endpoint.
|
||||||
|
|
2
cache/entry/entry.go
vendored
2
cache/entry/entry.go
vendored
|
@ -115,7 +115,7 @@ func (e *Entry) Reset(statusCode int, headers map[string][]string,
|
||||||
e.response.headers = newHeaders
|
e.response.headers = newHeaders
|
||||||
}
|
}
|
||||||
|
|
||||||
e.response.body = make([]byte,len(body))
|
e.response.body = make([]byte, len(body))
|
||||||
copy(e.response.body, body)
|
copy(e.response.body, body)
|
||||||
// check if a given life changer provided
|
// check if a given life changer provided
|
||||||
// and if it does then execute the change life time
|
// and if it does then execute the change life time
|
||||||
|
|
Loading…
Reference in New Issue
Block a user