Updated Readme.md: file.Close() for template read (#2068)
This commit is contained in:
parent
d6eafcf48a
commit
9b9f4fab34
@ -1807,6 +1807,7 @@ func main() {
|
|||||||
func loadTemplate() (*template.Template, error) {
|
func loadTemplate() (*template.Template, error) {
|
||||||
t := template.New("")
|
t := template.New("")
|
||||||
for name, file := range Assets.Files {
|
for name, file := range Assets.Files {
|
||||||
|
defer file.Close()
|
||||||
if file.IsDir() || !strings.HasSuffix(name, ".tmpl") {
|
if file.IsDir() || !strings.HasSuffix(name, ".tmpl") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user