21 lines
413 B
Go
21 lines
413 B
Go
package api
|
|
|
|
import (
|
|
"git.rosy.net.cn/jx-callback/business/jxutils/cache"
|
|
aliyunsmsclient "github.com/KenmyZhang/aliyun-communicate"
|
|
)
|
|
|
|
var (
|
|
SMSClient *aliyunsmsclient.SmsClient
|
|
Cacher cache.ICacher
|
|
)
|
|
|
|
func init() {
|
|
Init() // 这里必须要调用
|
|
}
|
|
|
|
// 这样写的原因是在测试时,可以重新读取配置文件
|
|
func Init() {
|
|
SMSClient = aliyunsmsclient.New("http://dysmsapi.aliyuncs.com/")
|
|
}
|