golang异常整理:
beego相关:
method doesn’t exist in the controller
panic: 'login1' method doesn't exist in the controller AccountController
goroutine 1 [running]:
github.com/astaxie/beego.(*ControllerRegister).addWithMethodParams(0xc04209e580, 0x941427, 0x6, 0x9af620, 0xc04214c000, 0x0, 0x0, 0x0, 0xc04207ff38, 0x1, ...)
E:/my-project/go_workspace/go_project01/project02/src/github.com/astaxie/beego/router.go:177 +0x897
github.com/astaxie/beego.(*ControllerRegister).Add(0xc04209e580, 0x941427, 0x6, 0x9af620, 0xc04214c000, 0xc04207ff38, 0x1, 0x1)
E:/my-project/go_workspace/go_project01/project02/src/github.com/astaxie/beego/router.go:157 +0x9c
github.com/astaxie/beego.Router(0x941427, 0x6, 0x9af620, 0xc04214c000, 0xc04207ff38, 0x1, 0x1, 0xc0421460e0)
E:/my-project/go_workspace/go_project01/project02/src/github.com/astaxie/beego/app.go:259 +0x84
router.init.0()
E:/go/go_project01/book-world/src/router/router.go:12 +0xdb
我检查了AccountController.go文件中确实是有login1 方法,后来发现是自己粗心吧首字母小写了,go语言估计方法小写也是私有的