[🚀] v0.12.23

This commit is contained in:
2025-03-04 17:12:57 +08:00
parent 1ef1a68948
commit 568843f71c
2 changed files with 18 additions and 6 deletions

View File

@@ -60,3 +60,12 @@ func (e Email) MarshalJSON() ([]byte, error) {
v := fmt.Sprintf("%s***%s", split[0][:1], split[0][len(split[0])-1:])
return []byte(`"` + v + "@" + split[1] + `"`), nil
}
func (usc UnifiedSocialCreditCode) MarshalJSON() ([]byte, error) {
if len(usc) != 18 {
return []byte(`"` + usc + `"`), nil
}
v := fmt.Sprintf("%s**********%s", usc[:4], usc[14:])
return []byte(`"` + v + `"`), nil
}