Fixed import cycle

This commit is contained in:
bytedream 2021-09-13 09:36:09 +02:00
parent a28002445a
commit 5921c132e3
3 changed files with 49 additions and 8 deletions

View file

@ -43,3 +43,15 @@ func pkcs5UnPadding(origData []byte) []byte {
unPadding := int(origData[length-1])
return origData[:(length - unPadding)]
}
func regexGroups(parsed [][]string, subexpNames ...string) map[string]string {
groups := map[string]string{}
for _, match := range parsed {
for i, content := range match {
if subexpName := subexpNames[i]; subexpName != "" {
groups[subexpName] = content
}
}
}
return groups
}