Added utils for url parsing

This commit is contained in:
bytedream 2021-09-11 15:01:32 +02:00
parent 9ae41e78e2
commit 2f5d3ea07b
3 changed files with 51 additions and 29 deletions

View file

@ -43,15 +43,3 @@ 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
}