Golang - text/template unit test to cover all the use-cases

I’ve the following example (similar of what we have in prod) “text/template” code which works OK, now I want to create a unit test for it that checks the function and also the text/template to see that I cover 100% of the code…

The problem here is how to do the text/template unit test which covers all the cases . I’m currently new to text/template and I want to make sure it’s working as expected.

Please visit: https://play.golang.org/p/203Al36Zigk

This is the template:

const tmpl = `#!/bin/bash
{{- range .File.Dependency}}
echo {{.EchoText}}
{{- range .Install}}
submitting {{.name}}
{{- end}}

{{- range $k, $v := .API}}
echo {{$k}}
submitting {{$v}}