Skip to content

Commit

Permalink
fix: env var initialisation
Browse files Browse the repository at this point in the history
  • Loading branch information
luisdavim committed Jan 11, 2023
1 parent d579c08 commit d2e64e6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions gotenv.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit d2e64e6

Please sign in to comment.