修改为大写
This commit is contained in:
+7
-4
@@ -7,21 +7,24 @@ import (
|
||||
"github.com/aliyun/alibaba-cloud-sdk-go/services/dysmsapi"
|
||||
)
|
||||
|
||||
type sms struct {
|
||||
type Sms struct {
|
||||
endPoint string
|
||||
accessKeyId string
|
||||
accessKeySecret string
|
||||
}
|
||||
|
||||
func NewSms(endPoint string, accessKeyId string, accessKeySecret string) *sms {
|
||||
return &sms{
|
||||
func NewSms(endPoint string, accessKeyId string, accessKeySecret string) *Sms {
|
||||
if endPoint == "" {
|
||||
endPoint = "dysmsapi.aliyuncs.com"
|
||||
}
|
||||
return &Sms{
|
||||
endPoint: endPoint,
|
||||
accessKeyId: accessKeyId,
|
||||
accessKeySecret: accessKeySecret,
|
||||
}
|
||||
}
|
||||
|
||||
func (s *sms) Send(phone, signName, templateCode string, params map[string]interface{}) error {
|
||||
func (s *Sms) Send(phone, signName, templateCode string, params map[string]interface{}) error {
|
||||
client, err := dysmsapi.NewClientWithAccessKey(s.endPoint, s.accessKeyId, s.accessKeySecret)
|
||||
if err != nil {
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user