1
0
Fork 0

chore: go module

This commit is contained in:
Fernandez Ludovic 2019-08-03 03:58:23 +02:00 committed by Traefiker Bot
parent f327b7b499
commit 4c5e7a238d
276 changed files with 1555 additions and 738 deletions

View file

@ -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 {