modify config
This commit is contained in:
@@ -30,6 +30,7 @@ func main() {
|
|||||||
defer logx.Sync()
|
defer logx.Sync()
|
||||||
msg.Init() // 企业微信或者钉钉群通知初始化,即根据配置文件中的配置设置钉钉机器人的密钥,URL和企业微信的URL
|
msg.Init() // 企业微信或者钉钉群通知初始化,即根据配置文件中的配置设置钉钉机器人的密钥,URL和企业微信的URL
|
||||||
tianapi.SetKey(cfg.TianApiKey) // 天行数据API初始化
|
tianapi.SetKey(cfg.TianApiKey) // 天行数据API初始化
|
||||||
|
wxgzh.InitCfg(cfg.WxgzhAppid, cfg.WxgzhSecret)
|
||||||
|
|
||||||
ctx, cancel := contextx.Default()
|
ctx, cancel := contextx.Default()
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|||||||
@@ -37,6 +37,11 @@ var (
|
|||||||
expiresIn int64
|
expiresIn int64
|
||||||
)
|
)
|
||||||
|
|
||||||
|
func InitCfg(appid_, secret_ string) {
|
||||||
|
appid = appid_
|
||||||
|
secret = secret_
|
||||||
|
}
|
||||||
|
|
||||||
type Resp struct {
|
type Resp struct {
|
||||||
Errcode int `json:"errcode"`
|
Errcode int `json:"errcode"`
|
||||||
Errmsg string `json:"errmsg"`
|
Errmsg string `json:"errmsg"`
|
||||||
|
|||||||
Reference in New Issue
Block a user