From d2e64e6317e94db9c598bb9934e75fb80c804bca Mon Sep 17 00:00:00 2001 From: Luis Davim Date: Wed, 11 Jan 2023 21:45:46 +0000 Subject: [PATCH] fix: env var initialisation --- gotenv.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gotenv.go b/gotenv.go index 769d820..dc013e1 100644 --- a/gotenv.go +++ b/gotenv.go @@ -201,10 +201,8 @@ func splitLines(data []byte, atEOF bool) (advance int, token []byte, err error) return eol, data[:idx], nil } -func strictParse(r io.Reader, env Env, override bool) (Env, error) { - if env == nil { - env = make(Env) - } +func strictParse(r io.Reader, override bool) (Env, error) { + env := make(Env) scanner := bufio.NewScanner(r) scanner.Split(splitLines)