Selaa lähdekoodia

Updated Readme.md: file.Close() for template read (#2068)

bullgare 6 vuotta sitten
vanhempi
commit
9b9f4fab34
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      README.md

+ 1 - 0
README.md

@@ -1807,6 +1807,7 @@ func main() {
 func loadTemplate() (*template.Template, error) {
 	t := template.New("")
 	for name, file := range Assets.Files {
+		defer file.Close()
 		if file.IsDir() || !strings.HasSuffix(name, ".tmpl") {
 			continue
 		}