mirror of
https://github.com/golang/go
synced 2024-11-18 22:55:23 -07:00
6d582d504c
In the common case that a file has imports, we're going to diff just the import block. That means that ApplyFixes doesn't need to produce the whole formatted file, which is a huge speedup. We will do more work twice for files with no imports, but those are presumably pretty short. Hat tip to Muir for pointing towards this in https://go-review.googlesource.com/c/tools/+/209579/2/internal/imports/imports.go#87 even if I didn't catch it. Updates golang/go#36001. Change-Id: Ibbeb4d88c6505eac26a36994de514813606c8c79 Reviewed-on: https://go-review.googlesource.com/c/tools/+/210200 Run-TryBot: Heschi Kreinick <heschi@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
testdata/mod | ||
fix_test.go | ||
fix.go | ||
imports_test.go | ||
imports.go | ||
mkindex.go | ||
mkstdlib.go | ||
mod_112_test.go | ||
mod_114_test.go | ||
mod_cache_test.go | ||
mod_cache.go | ||
mod_pre114_test.go | ||
mod_test.go | ||
mod.go | ||
proxy_112_test.go | ||
proxy_113_test.go | ||
sortimports.go | ||
zstdlib.go |