在不同版本中对应的ctx的类型和package有所不同。
在老版本中是通过引入beego包就可以直接使用beego.Context获取的到。
比如:
import "github.com/astaxie/beego"
func checkAccount(ctx *beego.Context) bool {
}
在新版本中只能新引入另外一个包来获取:
import "github.com/astaxie/beego/context"
func checkAccount(ctx *context.Context) bool {
}
因此在升级版本的过程中需要留意此处,否则会无法找到对应的定义。