1
0
mirror of https://github.com/golang/go synced 2024-11-05 16:06:10 -07:00
go/imports
Steve Gilbert 96b5a5404f imports: support files with longer lines
This change set fixes the issue by specifying a max buffer size of ~1 megabyte for Scanner.
Previously the max was not set resulting in the default max which is ~64k.  This increased max should not increase
memory use for smaller, normal files because it is a max and the code expands the buffer as needed for large tokens.

The change set includes an additional change to return an error from the Scanner which was ignored previously.

Fixes golang/go#18201

Change-Id: I11be39af74d5eb3b353ad81ba1cb5404207aa65d
Reviewed-on: https://go-review.googlesource.com/83800
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2018-01-03 17:47:52 +00:00
..
fastwalk_dirent_fileno.go cmd/goimports, imports: optimize directory scanning and other things 2016-07-19 03:21:45 +00:00
fastwalk_dirent_ino.go imports: fix +build tags to exclude syscall deps on appengine 2017-09-01 21:04:08 +00:00
fastwalk_portable.go imports: don't use fastpath on appengine (syscall not available) 2016-08-15 22:01:42 +00:00
fastwalk_test.go imports: fix formatting directive error found by go vet 2017-02-12 17:59:58 +00:00
fastwalk_unix.go imports: fix +build tags to exclude syscall deps on appengine 2017-09-01 21:04:08 +00:00
fastwalk.go imports: wait for fastWalk workers to finish before returning (take 2) 2017-04-25 17:30:35 +00:00
fix_test.go imports: support files with longer lines 2018-01-03 17:47:52 +00:00
fix.go imports: prioritize closer packages 2017-11-13 21:23:40 +00:00
imports.go imports: support files with longer lines 2018-01-03 17:47:52 +00:00
mkindex.go go.tools/imports: move goimports from github to go.tools. 2013-12-17 21:21:03 -05:00
mkstdlib.go imports: update zstdlib to Go 1.9 2017-07-17 03:03:41 +00:00
sortimports.go imports: Remove ancient Go 1.1 compatibility indirections. 2015-12-14 00:47:31 +00:00
zstdlib.go imports: update zstdlib to Go 1.9 2017-07-17 03:03:41 +00:00