doudandui1592 2016-06-06 09:30
浏览 656
已采纳

“未定义:beego.AppConfig中的beego”-如何访问Beego配置参数

As proposed here http://beego.me/docs/mvc/controller/config.md, I add parameters for MySQL user/password and when trying to access them (for example by using

beego.AppConfig.String("mysqluser"))

I get an "undefined: beego in beego.AppConfig" message. Any suggestions?

  • 写回答

1条回答 默认 最新

  • dragon4808 2016-06-06 09:38
    关注

    That was caused by a stupid mistake... I forgot to add the beego package... Try the following:

    import "github.com/astaxie/beego"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?