app.conf:
appname = gowebProject httpport = 8080 runmode = dev copyrequestbody = true [db] host= localhost port= 3306 databaseName = test userName= root password= root envRar = ${XXX_XXXXX} //XXX_XXXXX 是环境变量
pwd := beego.AppConfig.String("db::password")
envVar:=beego.AppConfig.String("db::envRar"))