Skip to content

Instantly share code, notes, and snippets.

@ninedraft
Last active July 21, 2020 10:50
Show Gist options
  • Save ninedraft/a023d6a773473bfec0b19820df99e48b to your computer and use it in GitHub Desktop.
Save ninedraft/a023d6a773473bfec0b19820df99e48b to your computer and use it in GitHub Desktop.
Snippet for go template resources
import (
"testing"
"text/template"
)
func testTemplate(test *testing.T, pattern string) {
test.Run(pattern, func(test *testing.T) {
var _, err = template.ParseGlob(pattern)
if err != nil {
test.Fatal(err)
}
})
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment