Skip to content

Conversation

@yangwenmai
Copy link

@yangwenmai yangwenmai commented May 5, 2019

Support more than the bufio.MaxScanTokenSize, if not read the incomplete.

@qustavo
Copy link
Owner

qustavo commented May 6, 2019

any spec for this?

@yangwenmai
Copy link
Author

When your load file is huge, you must be set size > bufio.MaxScanTokenSize.
You can review in https://golang.org/pkg/bufio/#Scanner.Buffer

@qustavo
Copy link
Owner

qustavo commented May 8, 2019

Could you reproduce the bug through a test so that I can better understand it?
Thanks!

@delete-merged-branch delete-merged-branch bot deleted the set_file_size branch May 8, 2019 12:21
@yangwenmai
Copy link
Author

yangwenmai commented May 8, 2019

sql, err := dotsql.LoadFromFile(filePath)
if err != nil {
    log.Fatalf("load sql file error: %s", err)
}

You must be add huge content (>65536 bytes) in this filePath, we get sql, but Can't read all you set content.

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 this pull request may close these issues.

2 participants