getconfig fix
This commit is contained in:
parent
af18dba556
commit
fba1608edb
@ -21,8 +21,9 @@ import (
|
|||||||
// The configuration loader will give priority to the environment variables
|
// The configuration loader will give priority to the environment variables
|
||||||
// The configuration loader will give priority to the local file over the default file
|
// The configuration loader will give priority to the local file over the default file
|
||||||
|
|
||||||
func GetConfLoader(AppName string) *onion.Onion {
|
func GetConfLoader() *onion.Onion {
|
||||||
logger := logs.GetLogger()
|
logger := logs.GetLogger()
|
||||||
|
AppName := logs.GetAppName()
|
||||||
EnvPrefix := strings.ToUpper(AppName[0:2]+AppName[3:]) + "_"
|
EnvPrefix := strings.ToUpper(AppName[0:2]+AppName[3:]) + "_"
|
||||||
defaultConfigFile := "/etc/oc/" + AppName[0:2] + ".json"
|
defaultConfigFile := "/etc/oc/" + AppName[0:2] + ".json"
|
||||||
localConfigFile := "./" + AppName[0:2] + ".json"
|
localConfigFile := "./" + AppName[0:2] + ".json"
|
||||||
|
Loading…
Reference in New Issue
Block a user