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:
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user