Package tmplfunc provides an extension of Go templates in which templates can be invoked as if they were functions.
See the package documentation for details.