mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Fixed import cycle
This commit is contained in:
parent
a28002445a
commit
5921c132e3
3 changed files with 49 additions and 8 deletions
12
utils.go
12
utils.go
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue