How do I differentiate a missing value from 0 in a map with Go’s text/template?
In Go I have a map[string]int
. I want to display values from this map through a Template from the text/template
package. If the map doesn’t contain a specific value, I want to display “n/a” instead. This is what I have tried: