更新存量问题
This commit is contained in:
parent
b1919eb898
commit
df4a0a0a39
@ -7,6 +7,8 @@
|
||||
// Date : 2023-05-23 14:25
|
||||
package data_mask
|
||||
|
||||
import "git.zhangdeman.cn/zhangdeman/data_mask/define"
|
||||
|
||||
// DefaultDataMask 默认实现
|
||||
//
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
@ -20,5 +22,5 @@ func (d DefaultDataMask) Mask(input string) string {
|
||||
}
|
||||
|
||||
func (d DefaultDataMask) Type() string {
|
||||
return TypeDefault
|
||||
return define.TypeDefault
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
// Package data_mask ...
|
||||
// Package define ...
|
||||
//
|
||||
// Description : data_mask ...
|
||||
//
|
||||
|
@ -7,6 +7,8 @@
|
||||
// Date : 2023-05-23 14:25
|
||||
package data_mask
|
||||
|
||||
import "git.zhangdeman.cn/zhangdeman/data_mask/strategy"
|
||||
|
||||
var (
|
||||
maskInstanceTable = make(map[string]IDataMask)
|
||||
defaultDataMask = &DefaultDataMask{}
|
||||
@ -14,8 +16,8 @@ var (
|
||||
|
||||
func init() {
|
||||
maskInstanceList := []IDataMask{
|
||||
&MailDataMask{}, // 邮箱脱敏
|
||||
&PhoneDataMask{}, // 手机号脱敏
|
||||
&strategy.MailDataMask{}, // 邮箱脱敏
|
||||
&strategy.PhoneDataMask{}, // 手机号脱敏
|
||||
}
|
||||
for _, item := range maskInstanceList {
|
||||
maskInstanceTable[item.Type()] = item
|
||||
|
Loading…
Reference in New Issue
Block a user