1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 10:27:06 +00:00

minor version 11.2.2 - register sessions as middleware and Context.HTML/Text like Context.Writef

Former-commit-id: 6f5f1c502fb06d739c350c3ecc891f495dc03a6e
This commit is contained in:
Gerasimos (Makis) Maropoulos
2019-07-24 19:51:42 +03:00
parent 275cc14e39
commit 29bf846bd1
10 changed files with 95 additions and 39 deletions

View File

@@ -37,11 +37,11 @@ func (ctx *MyContext) Next() {
// Override any context's method you want...
// [...]
func (ctx *MyContext) HTML(htmlContents string) (int, error) {
func (ctx *MyContext) HTML(format string, args ...interface{}) (int, error) {
ctx.Application().Logger().Infof("Executing .HTML function from MyContext")
ctx.ContentType("text/html")
return ctx.WriteString(htmlContents)
return ctx.Writef(format, args...)
}
func main() {