修改为大写

This commit is contained in:
Yun
2025-05-12 22:14:52 +08:00
parent 3be60f7a73
commit c8b5b42558
2 changed files with 15 additions and 12 deletions
+7 -4
View File
@@ -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