1
0
mirror of https://github.com/golang/go synced 2024-10-01 04:08:32 -06:00
Commit Graph

5 Commits

Author SHA1 Message Date
Ainar Garipov
feee8acb39 all: fix more typos
Change-Id: I978ad5e1800ebfceb78aaced438331a8341715d4
Reviewed-on: https://go-review.googlesource.com/c/tools/+/194697
Reviewed-by: Toshihiro Shiino <shiino.toshihiro@gmail.com>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-09-11 15:13:14 +00:00
Bryan C. Mills
9fb5a2f241 all: set GO111MODULE=off for tests that use GOPATHs in testdata.
Some users may set GO111MODULE=on, and we will eventually want to be able to
build x/tools itself in module mode.

Updates golang/go#27858
Updates golang/go#27852

Change-Id: Iaf488b2a89e6526471530245cb580f1f0391a770
Reviewed-on: https://go-review.googlesource.com/137815
Run-TryBot: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Michael Matloob <matloob@golang.org>
2018-10-03 17:21:27 +00:00
Alan Donovan
af0fde4393 cmd/fiximports: -replace flag specifies canonical packages in absence of import comments
+ Tests.

Change-Id: I0544546dda93d24aedbbfe1ffdc6882e76bfb3f8
Reviewed-on: https://go-review.googlesource.com/12940
Reviewed-by: Jason Buberel <jbuberel@google.com>
2015-09-01 14:23:39 +00:00
Alan Donovan
680b4cd5a8 cmd/fiximports: added package-level documentation
Change-Id: I612229e5d9e80a25cd77296c0abb6bdcf62bcf8a
Reviewed-on: https://go-review.googlesource.com/12924
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-07-31 13:54:42 +00:00
Alan Donovan
7d75e8b219 cmd/fiximports: a tool to rewrite import paths to match import comments.
fiximports enumerates the set of packages identified by the
command-line arguments, using "go list" notation.  Within each
package, it replaces all imports of non-canonical packages by their
canonical name, introducing an import renaming if (heuristically)
necessary.

If a package comes from one of the -baddomains, and it has no import
comment, fiximports reports an error.  The error message includes the
list of packages that import the errant package, directly or
indirectly.  This flag is used to indicate "sinking ship" package
hosting domains like code.google.com.

Caveat: this process is not trivially reversible.  Consider a package A
to which we add an import comment "B", and run the tool.  Package C,
which imported A, now imports B.  ('go get -u' would fetch package B).
But changing the import comment in directory A and re-running the tool
will not cause C to be changed because it no longer imports A; it
imports B.

+ Tests.

Change-Id: I3d3d9663d3c084356fffc7e55407709ebc6d9a39
Reviewed-on: https://go-review.googlesource.com/8562
Reviewed-by: Andrew Gerrand <adg@golang.org>
2015-05-13 15:07:09 +00:00