func (ctx *Context) Abort(status int, body string) {
	ctx.ResponseWriter.WriteHeader(status)
	if _, ok := middleware.ErrorMaps[body]; ok {
		panic(body)
	}
	if e, ok := middleware.HTTPExceptionMaps[status]; ok {
		if len(body) >= 1 {
			e.Description = body
		}
		panic(e)
	}
	panic(body)
}
Abort stops this request.
if middleware.ErrorMaps exists, panic body.
if middleware.HTTPExceptionMaps exists, panic HTTPException struct with status and body string.
package context
import (
	"crypto/hmac"
	"crypto/sha1"
	"encoding/base64"
	"fmt"
	"net/http"
	"strconv"
	"strings"
	"time"
	"github.com/astaxie/beego/middleware"
	"github.com/astaxie/beego/utils"
)
type Context struct {
	Input          *BeegoInput
	Output         *BeegoOutput
	Request        *http.Request
	ResponseWriter http.ResponseWriter
	_xsrf_token    string
}
func (ctx *Context) Redirect(status int, localurl string) {
	ctx.Output.Header("Location", localurl)
	ctx.ResponseWriter.WriteHeader(status)
}