14 lines
392 B
Go
14 lines
392 B
Go
package sms
|
|
|
|
import "log"
|
|
|
|
// MockSender 模拟短信发送器,用于开发模式
|
|
// 不真实发送短信,仅通过日志打印验证码,便于本地调试
|
|
type MockSender struct{}
|
|
|
|
// Send 模拟发送验证码,打印到日志并返回 nil
|
|
func (m *MockSender) Send(phone string, code string) error {
|
|
log.Printf("[MockSMS] 手机号: %s, 验证码: %s", phone, code)
|
|
return nil
|
|
}
|