The text/template documentation has a FuncMap example, does this help solving your issue?
If not, can you describe the exact problem that you observe (error messages, expected behavior versus observed behavior, etc.)?
A minimal but complete code example would also be helpful. The code as given would not compile, and it does not show how the template is executed. Ideally, the code example should run in the playground.
Also a tip: to share code in the forum, use three backticks in a separate line at the beginning and at the end of the code, like so:
```go
// add go code here
```
Optionally, add the word go after the initial backticks, as shown.
The code will then be formatted with all indentation preserved, and with syntax highlighting applied.