I want to get value of a key defined in beego's app.conf and render in html pages. As per documentation on http://beego.me/docs/mvc/view/template.md I can get value of AppConfig by using config function in templates. However there is no example in documentation.
Get the value of AppConfig. {{config configType configKey defaultValue}}. configType must be String, Bool, Int, Int64, Float, or DIY
After trying many ways I came to this:
<div>{{config config.String config.appname "TestDefaultValue"}}</div>
But I am always getting error:
<config>: wrong number of args for config: want 3 got 0
What is the correct way to use config template function?