官網 http://beego.me
直接在router.go 中寫
beego.Any("/foo", func(ctx *context.Context) {
ctx.WriteString("hello world")
})
發現會報錯
routers/router.go:12: undefined: context in context.Context
解決辦法
import( "github.com/astaxie/beego/context" )
官網 http://beego.me
直接在router.go 中寫
beego.Any("/foo", func(ctx *context.Context) {
ctx.WriteString("hello world")
})
發現會報錯
routers/router.go:12: undefined: context in context.Context
解決辦法
import( "github.com/astaxie/beego/context" )