runtime: fix patch for testing
This commit is contained in:
@@ -1,23 +1,10 @@
|
|||||||
package runtime
|
package runtime
|
||||||
|
|
||||||
import (
|
|
||||||
"strings"
|
|
||||||
)
|
|
||||||
|
|
||||||
func SkipToBuild(pkgPath string) bool {
|
func SkipToBuild(pkgPath string) bool {
|
||||||
if _, ok := hasAltPkg[pkgPath]; ok {
|
if _, ok := hasAltPkg[pkgPath]; ok {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if _, ok := supportedInternal[pkgPath]; ok {
|
return pkgPath == "unsafe"
|
||||||
return false
|
|
||||||
}
|
|
||||||
switch pkgPath {
|
|
||||||
case "unsafe":
|
|
||||||
return true
|
|
||||||
default:
|
|
||||||
return strings.HasPrefix(pkgPath, "internal/") ||
|
|
||||||
strings.HasPrefix(pkgPath, "runtime/internal/")
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func HasAltPkg(path string) (b bool) {
|
func HasAltPkg(path string) (b bool) {
|
||||||
@@ -66,10 +53,3 @@ var hasAltPkg = map[string]none{
|
|||||||
"runtime/internal/syscall": {},
|
"runtime/internal/syscall": {},
|
||||||
"io": {},
|
"io": {},
|
||||||
}
|
}
|
||||||
|
|
||||||
var supportedInternal = map[string]none{
|
|
||||||
"internal/race": {},
|
|
||||||
"internal/stringslite": {},
|
|
||||||
"internal/filepathlite": {},
|
|
||||||
"internal/fmtsort": {},
|
|
||||||
}
|
|
||||||
|
|||||||
Reference in New Issue
Block a user