// InitConfig inits Config and CookieStoreSecretKey.

InitConfig inits Config and CookieStoreSecretKey.
// InitConfig inits Config and CookieStoreSecretKey .
func InitConfig() {
	C = new(Config)
	C = NewDefaultConfig()
	if _, err := toml.DecodeFile(*configFilepath, C); err != nil {
		log.Warnf("couldn't load config: %v, initializing default config", err)
	} else {
		log.Infof("config file succesfully loaded from %s", *configFilepath)
	}
	CookieStoreSecretKey = os.Getenv("SECRET_KEY")
	if CookieStoreSecretKey == "" {
		log.Warnf("Using default secret key, for security reasons provide it via env SECRET_KEY arg")
		CookieStoreSecretKey = "1234567890"
	}
}
func InitConfig ( ) { C = new ( Config ) C = NewDefaultConfig ( ) if _ , err := toml . DecodeFile ( * configFilepath , C ) ; err != nil { log . Warnf ( " " , err ) } else { log . Infof ( " " , * configFilepath ) } CookieStoreSecretKey = os . Getenv ( " " ) if CookieStoreSecretKey == " " { log . Warnf ( " " ) CookieStoreSecretKey = " " } }
InitConfig inits Config and CookieStoreSecretKey.
InitConfig inits Config and CookieStoreSecretKey .