mirror of
https://github.com/gin-gonic/gin.git
synced 2025-10-19 15:57:48 +08:00
Updated Readme.md: file.Close() for template read.
This commit is contained in:
parent
0b96dd8ae5
commit
425c29be52
@ -1799,6 +1799,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…
x
Reference in New Issue
Block a user