I\'m trying to print the values of a map, whose keys have a dot (.) on it.
.
Example map:
type TemplateData struct { Data map[string] int
I had a similar issue where my key names in secret vault had - and . in it for example
-
test-key or test.key
test-key
test.key
If solved it like this
{{ with secret "secret/path/test"}} {{ range $k, $v := .Data }} {{ $k }}:{{ $v }} {{ end }} {{ end }}
Hope this will help someone...