mirror of
https://github.com/golang/go.git
synced 2025-05-29 11:25:43 +00:00
cmd/go: make modifications to copies of go/build files for index
This change makes the modifications to the copies of the files of go/build used by the modindex package needed for them to be used by modindex. It also removes the parts of the files not needed by the modindex package. Change-Id: I72607868bd7e1ca5fc7c5a496cc836e7922e3786 Reviewed-on: https://go-review.googlesource.com/c/go/+/403974 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Bryan Mills <bcmills@google.com> Reviewed-by: Michael Matloob <matloob@golang.org> Run-TryBot: Michael Matloob <matloob@golang.org>
This commit is contained in:
parent
1e5fcefcd1
commit
27ace7ab9e
File diff suppressed because it is too large
Load Diff
@ -2,7 +2,10 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package build
|
||||
// This file is a lightly modified copy go/build/read.go with unused parts
|
||||
// removed.
|
||||
|
||||
package modindex
|
||||
|
||||
import (
|
||||
"bufio"
|
||||
|
@ -1,10 +0,0 @@
|
||||
package build
|
||||
|
||||
// This file is being added for this cl only just to get builds to pass and
|
||||
// let the other files be submitted unchanged.
|
||||
|
||||
const defaultCGO_ENABLED = ""
|
||||
|
||||
var cgoEnabled = map[string]bool{}
|
||||
|
||||
func getToolDir() string { return "" }
|
@ -2,7 +2,9 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package build
|
||||
// This file is a lightly modified copy go/build/syslist_test.go.
|
||||
|
||||
package modindex
|
||||
|
||||
// knownOS is the list of past, present, and future known GOOS values.
|
||||
// Do not remove from this list, as it is used for filename matching.
|
||||
|
@ -2,9 +2,12 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package build
|
||||
// This file is a lightly modified copy go/build/syslist_test.go.
|
||||
|
||||
package modindex
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
"runtime"
|
||||
"testing"
|
||||
)
|
||||
@ -55,7 +58,7 @@ var tests = []GoodFileTest{
|
||||
|
||||
func TestGoodOSArch(t *testing.T) {
|
||||
for _, test := range tests {
|
||||
if Default.goodOSArchFile(test.name, make(map[string]bool)) != test.result {
|
||||
if (*Context)(&build.Default).goodOSArchFile(test.name, make(map[string]bool)) != test.result {
|
||||
t.Fatalf("goodOSArchFile(%q) != %v", test.name, test.result)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user