Skip to content

Commit 509c4ad

Browse files
committed
Update shared.go
1 parent 860d268 commit 509c4ad

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

pkg/models/shared.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,19 +54,24 @@ func AppendFields(destination map[string]string, source map[string]string) (map[
5454
func UnfoldFields(fields map[string]string) map[string]string {
5555
re := regexp.MustCompile(`<<[a-zA-Z0-9_.]*/[a-zA-Z0-9_]*>>`)
5656
for key := range fields {
57+
fmt.Println(fields[key])
5758
loop := true
5859
for loop {
5960
foundKeys := re.FindAllString(fields[key], -1)
6061
for _, foundKey := range foundKeys {
62+
fmt.Println(foundKey)
6163
searchKey := strings.ReplaceAll(foundKey, "<<", "")
6264
searchKey = strings.ReplaceAll(searchKey, ">>", "")
65+
fmt.Println(searchKey)
6366
fields[key] = strings.ReplaceAll(fields[key], foundKey, fields[searchKey])
67+
fmt.Println(fields[key])
6468
}
6569

6670
if !re.MatchString(fields[key]) {
6771
loop = false
6872
}
6973
}
74+
fmt.Println("-----------------------")
7075
}
7176

7277
return fields

0 commit comments

Comments
 (0)