app.conf:web
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"))