package wx import "xiaoniaokuaiyan.com/xiaoniao/config" type Config map[string]string var DefaultConfig Config func InitConfig() { sec := config.IniConf.Section("weixin") DefaultConfig = Config{ "appid": sec.Key("wx.appid").Value(), "secret": sec.Key("wx.secret").Value(), "apikey": sec.Key("wx.apikey").Value(), "mch_id": sec.Key("wx.mch_id").Value(), "paycb_notify_url": sec.Key("wx.paycb_notify_url").Value(), "cert_file": sec.Key("wx.cert_file").Value(), "key_file": sec.Key("wx.key_file").Value(), } } func init() { config.RegistChangeCallback(InitConfig) }