godotenv icon indicating copy to clipboard operation
godotenv copied to clipboard

Lines > 64k cause "bufio.Scanner: token too long"

Open bd82 opened this issue 2 years ago • 0 comments

When using env files with lines > 64k parsing would fail due to the Scanner's default maxToken size. It seems that using ReadLine is the optimal manner to resolve this Particularly as I don't see a good way to expose the max token size as part of godotenv. But I am new to GoLang so maybe I am missing something...

references:

https://pkg.go.dev/[email protected]#Reader.ReadLine https://stackoverflow.com/questions/21124327/how-to-read-a-text-file-line-by-line-in-go-when-some-lines-are-long-enough-to-ca

bd82 avatar Oct 10 '21 10:10 bd82