From 2fd8b20b7727fdcec5f5691f2fcd78d11fea43ac Mon Sep 17 00:00:00 2001 From: opbnq-q Date: Fri, 7 Mar 2025 18:49:22 +0700 Subject: [PATCH] close files --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 8e49750..31d5eaf 100644 --- a/main.go +++ b/main.go @@ -12,11 +12,11 @@ func main() { for _, structName := range structNames { file, err := os.Open(path) + defer file.Close() if err != nil { panic(err) } structFields := utils.GetStructFields(file, structName) - file.Close() generation.Generate(structName, structFields) } }