1234567891011121314151617181920 |
- package component
- import (
- "eta/eta_mini_ht_api/common/component/config"
- _ "eta/eta_mini_ht_api/common/component/database"
- logger "eta/eta_mini_ht_api/common/component/log"
- _ "eta/eta_mini_ht_api/common/component/sms"
- "eta/eta_mini_ht_api/common/contants"
- "eta/eta_mini_ht_api/common/utils/sms"
- )
- func init() {
- //配置SMS平台,没有配置直接报错
- if smsConf, ok := config.GetConfig(contants.SMS).(*config.SMSConfig); ok && smsConf != nil {
- logger.Info("开始加载短信平台客户端")
- sms.InitSmsSender(smsConf)
- } else {
- panic("加载短信平台客户端失败")
- }
- }
|