mirror of
https://github.com/golang/go
synced 2024-11-18 16:14:46 -07:00
1c0c7a8cce
The comment of Process() implies src can be nil, but it didn't handle nil src correctly before because parse() doesn't expect nil src. Passing []byte(nil) to parser.ParseFile() results in error and parse() tries to parse again by modifying src if src is statement list. This problem isn't related with cmd/goimports because goimports doesn't pass []byte(nil) to Process() as src. Fixes golang/go#19676 Change-Id: Idbaa6646c3907690763eabc798860c56bb9963d4 Reviewed-on: https://go-review.googlesource.com/38613 Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> |
||
---|---|---|
.. | ||
fastwalk_dirent_fileno.go | ||
fastwalk_dirent_ino.go | ||
fastwalk_portable.go | ||
fastwalk_test.go | ||
fastwalk_unix.go | ||
fastwalk.go | ||
fix_test.go | ||
fix.go | ||
imports.go | ||
mkindex.go | ||
mkstdlib.go | ||
sortimports.go | ||
zstdlib.go |