Documentation ¶
Index ¶
Constants ¶
View Source
const ( EnvLocal = "local" EnvDev = "development" EnvStg = "staging" EnvProd = "production" )
Variables ¶
This section is empty.
Functions ¶
func InitConfig ¶
func InitConfig(cName, cPath, cType string, marshalFn func())
InitConfig sets configuration info and marshal config struct via marshalFn. e.g.
common.InitConfig(cName, cPath, cType, func() {
if err := viper.Unmarshal(&c); err != nil { panic("config file unmarshal failed") } })
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.