mirror of
https://github.com/astaxie/beego.git
synced 2025-07-02 13:40:19 +00:00
fix #18
func (this *MainController) Get() { this.GoToFunc("Test") } func (this *MainController) Test() { this.Ctx.WriteString("testtest") }
This commit is contained in:
@ -404,6 +404,15 @@ func (p *ControllerRegistor) ServeHTTP(rw http.ResponseWriter, r *http.Request)
|
||||
method = vc.MethodByName("Options")
|
||||
method.Call(in)
|
||||
}
|
||||
gotofunc := vc.Elem().FieldByName("gotofunc").String()
|
||||
if gotofunc != "" {
|
||||
method = vc.MethodByName(gotofunc)
|
||||
if method.IsValid() {
|
||||
method.Call(in)
|
||||
} else {
|
||||
panic("gotofunc is exists:" + gotofunc)
|
||||
}
|
||||
}
|
||||
if !w.started {
|
||||
if AutoRender {
|
||||
method = vc.MethodByName("Render")
|
||||
|
Reference in New Issue
Block a user