Skip to content

Commit 4db1697

Browse files
matloobgopherbot
authored andcommitted
go/packages/packagestest: fold modules_111.go into modules.go
x/tools hasn't supported Go versions earlier than 1.11 (or even 1.11 itself) for a while. Change-Id: I723c43dbcd1c4df56d8c663a78ec31524b912985 Reviewed-on: https://go-review.googlesource.com/c/tools/+/581795 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Alan Donovan <adonovan@google.com> Auto-Submit: Alan Donovan <adonovan@google.com>
1 parent ccdef3c commit 4db1697

File tree

4 files changed

+2
-18
lines changed

4 files changed

+2
-18
lines changed

go/packages/packagestest/export.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ type Exporter interface {
147147

148148
// All is the list of known exporters.
149149
// This is used by TestAll to run tests with all the exporters.
150-
var All []Exporter
150+
var All = []Exporter{GOPATH, Modules}
151151

152152
// TestAll invokes the testing function once for each exporter registered in
153153
// the All global.

go/packages/packagestest/gopath.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,6 @@ import (
4141
// /sometemporarydirectory/repoa/src
4242
var GOPATH = gopath{}
4343

44-
func init() {
45-
All = append(All, GOPATH)
46-
}
47-
4844
type gopath struct{}
4945

5046
func (gopath) Name() string {

go/packages/packagestest/modules.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
// Modules is the exporter that produces module layouts.
21-
// Each "repository" is put in it's own module, and the module file generated
21+
// Each "repository" is put in its own module, and the module file generated
2222
// will have replace directives for all other modules.
2323
// Given the two files
2424
//

go/packages/packagestest/modules_111.go

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)