ExecuteString substitutes template tags (placeholders) with the corresponding values from the map m and returns the result. Substitution map m may contain values with the following types: - []byte - the fastest value type - string - convenient value type - TagFunc - flexible value type This functi
(m map[string]interface{})
| 189 | // This function is optimized for frozen templates. |
| 190 | // Use ExecuteString for constantly changing templates. |
| 191 | func (t *Template) ExecuteString(m map[string]interface{}) []byte { |
| 192 | return t.ExecuteFuncString(func(w io.Writer, tag string) (int, error) { return stdTagFunc(w, tag, m) }) |
| 193 | } |
| 194 | |
| 195 | func stdTagFunc(w io.Writer, tag string, m map[string]interface{}) (int, error) { |
| 196 | v := m[tag] |
no test coverage detected