Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
bd82 opened this issue Oct 10, 2021 · 0 comments · May be fixed by #161
Open

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

bd82 opened this issue Oct 10, 2021 · 0 comments · May be fixed by #161

Comments

@bd82
Copy link

bd82 commented Oct 10, 2021

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/bufio@go1.12#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 bd82 linked a pull request Oct 10, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant