Last active
July 21, 2020 10:50
-
-
Save ninedraft/a023d6a773473bfec0b19820df99e48b to your computer and use it in GitHub Desktop.
Snippet for go template resources
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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