Skip to content

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

Open
@bd82

Description

@bd82

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions