From d94fdbe829d24b31d6ac30b6beb28b6420c1778a Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Tue, 23 Aug 2022 09:47:41 +0100 Subject: [PATCH] fix: add missing file close (#20) --- 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) }