Files
huangguo_server/common/ysphone/phone.go
T
rootandClaude Opus 5 8679200f41 Initial commit
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-15 13:57:10 +08:00

12 lines
253 B
Go

package ysphone
import "github.com/nyaruka/phonenumbers"
func FormatPhoneNumber(phoneNumber string) string {
if phoneNumber == "" {
return ""
}
num, _ := phonenumbers.Parse(phoneNumber, "CN")
return phonenumbers.Format(num, phonenumbers.E164)
}