1
0
mirror of https://github.com/astaxie/beego.git synced 2024-06-23 02:44:13 +00:00
This commit is contained in:
Viet Hung Nguyen 2015-08-26 15:57:28 +07:00
parent a89f14d80d
commit cbb6591bdb

View File

@ -88,12 +88,12 @@ func Register(name string, adapter Config) {
// adapterName is ini/json/xml/yaml.
// filename is the config file path.
func NewConfig(adapterName, fileaname string) (ConfigContainer, error) {
func NewConfig(adapterName, filename string) (ConfigContainer, error) {
adapter, ok := adapters[adapterName]
if !ok {
return nil, fmt.Errorf("config: unknown adaptername %q (forgotten import?)", adapterName)
}
return adapter.Parse(fileaname)
return adapter.Parse(filename)
}
// adapterName is ini/json/xml/yaml.