Skip to content

Commit

Permalink
early exit unescape
Browse files Browse the repository at this point in the history
  • Loading branch information
crandles committed Sep 30, 2024
1 parent b61ea9b commit 89c5d9e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions maps/maps.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func flatten(m map[string]interface{}, keys []string, delim string, out map[stri
}

func unescape(keyPairs []string, delim string) []string {
if delim == "" {
return keyPairs
}
var result []string
for _, kp := range keyPairs {
// first pass, unescape the delimiter
Expand Down

0 comments on commit 89c5d9e

Please sign in to comment.