Skip to content

Commit

Permalink
Update gotenv.go
Browse files Browse the repository at this point in the history
Co-authored-by: Luis Davim <luis.davim@gmail.com>
  • Loading branch information
LeGEC and luisdavim committed Jan 11, 2023
1 parent e679cff commit fc2be8d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions gotenv.go
Expand Up @@ -190,9 +190,8 @@ func splitLines(data []byte, atEOF bool) (advance int, token []byte, err error)
return 0, nil, nil
}

eol := idx
// consume CR or LF
eol++
eol := idx + 1
// detect CRLF
if data[eol-1] == '\r' && len(data) > eol && data[eol] == '\n' {
eol++
Expand Down

0 comments on commit fc2be8d

Please sign in to comment.