1
0
mirror of https://github.com/golang/go synced 2024-11-18 07:24:45 -07:00
go/imports
kazyshr 0fdf0c7385 imports: fix circular imports
goimports will add an import for the package of target source file accidentally,
so check if package path is different from target source file when finding import candidates.

Fixes golang/go#30663

Change-Id: I77c29bc74bef6c888e63ccb501b013a5fbc30b5c
Reviewed-on: https://go-review.googlesource.com/c/tools/+/170238
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
2019-04-07 03:08:57 +00:00
..
testdata/mod imports: stop using go/packages for modules 2019-01-22 20:29:12 +00:00
fix_test.go imports: fix circular imports 2019-04-07 03:08:57 +00:00
fix.go imports: fix circular imports 2019-04-07 03:08:57 +00:00
imports.go imports: remove globals, stop using build.Default 2019-01-18 19:33:59 +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: add syscall/js API to zstdlib.go 2019-03-30 15:02:33 +00:00
mod_112_test.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
mod_test.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
mod.go imports: handle missing main module 2019-03-15 20:09:29 +00:00
sortimports.go Revert "imports: support repairing import grouping/ordering" 2018-10-24 17:12:08 +00:00
zstdlib.go imports: add syscall/js API to zstdlib.go 2019-03-30 15:02:33 +00:00