chore: go module
This commit is contained in:
parent
f327b7b499
commit
4c5e7a238d
276 changed files with 1555 additions and 738 deletions
|
@ -7,7 +7,7 @@ import (
|
|||
"regexp"
|
||||
|
||||
"github.com/mitchellh/copystructure"
|
||||
"github.com/mvdan/xurls"
|
||||
"mvdan.cc/xurls/v2"
|
||||
)
|
||||
|
||||
const (
|
||||
|
@ -39,7 +39,7 @@ func Do(baseConfig interface{}, indent bool) (string, error) {
|
|||
|
||||
func doOnJSON(input string) string {
|
||||
mailExp := regexp.MustCompile(`\w[-._\w]*\w@\w[-._\w]*\w\.\w{2,3}"`)
|
||||
return xurls.Relaxed.ReplaceAllString(mailExp.ReplaceAllString(input, maskLarge+"\""), maskLarge)
|
||||
return xurls.Relaxed().ReplaceAllString(mailExp.ReplaceAllString(input, maskLarge+"\""), maskLarge)
|
||||
}
|
||||
|
||||
func doOnStruct(field reflect.Value) error {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue