From 077cbe0bd17df6b49c18502e4268e2627a955119 Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Mon, 22 Aug 2022 21:18:20 +0100 Subject: [PATCH] fix: add missing file close --- gotenv.go | 1 + 1 file changed, 1 insertion(+) diff --git a/gotenv.go b/gotenv.go index b7a83be..7b1186e 100644 --- a/gotenv.go +++ b/gotenv.go @@ -124,6 +124,7 @@ func Read(filename string) (Env, error) { if err != nil { return nil, err } + defer f.Close() return strictParse(f, false) }