golang web框架 beego 学习 (五) 配置文件
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"))