Skip to content

Commit

Permalink
fix: handle YAML/TOML key value entries
Browse files Browse the repository at this point in the history
  • Loading branch information
JustinGrote authored and JanDeDobbeleer committed Jul 18, 2021
1 parent 41a1085 commit 5ed452e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/properties.go
Expand Up @@ -167,6 +167,14 @@ func parseKeyValueArray(param interface{}) map[string]string {
switch v := param.(type) {
default:
return map[string]string{}
case map[interface{}]interface{}:
keyValueArray := make(map[string]string)
for key, value := range v {
val := value.(string)
keyString := fmt.Sprintf("%v", key)
keyValueArray[keyString] = val
}
return keyValueArray
case map[string]interface{}:
keyValueArray := make(map[string]string)
for key, value := range v {
Expand Down

0 comments on commit 5ed452e

Please sign in to comment.