天天看點

beego 用golang 做http開發的架構

官網  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" )