diff --git a/go/packages/packagestest/export.go b/go/packages/packagestest/export.go index 3558ccfdd01..67d48562f4c 100644 --- a/go/packages/packagestest/export.go +++ b/go/packages/packagestest/export.go @@ -147,7 +147,7 @@ type Exporter interface { // All is the list of known exporters. // This is used by TestAll to run tests with all the exporters. -var All []Exporter +var All = []Exporter{GOPATH, Modules} // TestAll invokes the testing function once for each exporter registered in // the All global. diff --git a/go/packages/packagestest/gopath.go b/go/packages/packagestest/gopath.go index d56f523ed6f..c2e57a1545c 100644 --- a/go/packages/packagestest/gopath.go +++ b/go/packages/packagestest/gopath.go @@ -41,10 +41,6 @@ import ( // /sometemporarydirectory/repoa/src var GOPATH = gopath{} -func init() { - All = append(All, GOPATH) -} - type gopath struct{} func (gopath) Name() string { diff --git a/go/packages/packagestest/modules.go b/go/packages/packagestest/modules.go index 7eff9432086..089848c28bc 100644 --- a/go/packages/packagestest/modules.go +++ b/go/packages/packagestest/modules.go @@ -18,7 +18,7 @@ import ( ) // Modules is the exporter that produces module layouts. -// Each "repository" is put in it's own module, and the module file generated +// Each "repository" is put in its own module, and the module file generated // will have replace directives for all other modules. // Given the two files // diff --git a/go/packages/packagestest/modules_111.go b/go/packages/packagestest/modules_111.go deleted file mode 100644 index 4b976f6fd2a..00000000000 --- a/go/packages/packagestest/modules_111.go +++ /dev/null @@ -1,12 +0,0 @@ -// Copyright 2018 The Go Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -//go:build go1.11 -// +build go1.11 - -package packagestest - -func init() { - All = append(All, Modules) -}