1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-18 02:17:05 +00:00

minor: update xorm example based on chat comments (they moved repository)

This commit is contained in:
Gerasimos (Makis) Maropoulos
2020-08-30 17:59:14 +03:00
parent f93c8b13bc
commit 77ce225c2f
2 changed files with 18 additions and 12 deletions

View File

@@ -683,13 +683,13 @@ func (ctx *Context) StopWithStatus(statusCode int) {
}
// StopWithText stops the handlers chain and writes the "statusCode"
// among with a message "plainText".
// among with a fmt-style text of "format" and optional arguments.
//
// If the status code is a failure one then
// it will also fire the specified error code handler.
func (ctx *Context) StopWithText(statusCode int, plainText string) {
func (ctx *Context) StopWithText(statusCode int, format string, args ...interface{}) {
ctx.StopWithStatus(statusCode)
ctx.WriteString(plainText)
ctx.WriteString(fmt.Sprintf(format, args...))
}
// StopWithError stops the handlers chain and writes the "statusCode"