aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/go/internal/get/get.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2018-06-08 13:59:17 -0400
committerRuss Cox <rsc@golang.org>2018-06-15 18:57:58 +0000
commit5756895877492e3427c92e9ec8784eb1f4b01474 (patch)
tree5ea749c030e1c6a353873477603969c745e6f676 /src/cmd/go/internal/get/get.go
parent1a92cdbfc10e0c66f2e015264a39159c055a5c15 (diff)
downloadgo-5756895877492e3427c92e9ec8784eb1f4b01474.tar.gz
go-5756895877492e3427c92e9ec8784eb1f4b01474.zip
cmd/go: add dark copy of golang.org/x/vgo
This CL corresponds to golang.org/cl/118096 (7fbc8df48a7) in the vgo repo. It copies the bulk of the code from vgo back into the main repo, but completely disabled - vgo.Init is a no-op and vgo.Enabled returns false unconditionally. The point of this CL is to make the two trees easier to diff and to make future syncs smaller. Change-Id: Ic34fd5ddd8272a70c5a3b3437b5169e967d0ed03 Reviewed-on: https://go-review.googlesource.com/118095 Reviewed-by: Bryan C. Mills <bcmills@google.com>
Diffstat (limited to 'src/cmd/go/internal/get/get.go')
-rw-r--r--src/cmd/go/internal/get/get.go16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/cmd/go/internal/get/get.go b/src/cmd/go/internal/get/get.go
index ffa15c5ba4..6eabc4eabb 100644
--- a/src/cmd/go/internal/get/get.go
+++ b/src/cmd/go/internal/get/get.go
@@ -16,7 +16,9 @@ import (
"cmd/go/internal/base"
"cmd/go/internal/cfg"
"cmd/go/internal/load"
+ "cmd/go/internal/search"
"cmd/go/internal/str"
+ "cmd/go/internal/vgo"
"cmd/go/internal/web"
"cmd/go/internal/work"
)
@@ -90,6 +92,10 @@ func init() {
}
func runGet(cmd *base.Command, args []string) {
+ if vgo.Enabled() {
+ base.Fatalf("go get: vgo not implemented")
+ }
+
work.BuildInit()
if *getF && !*getU {
@@ -170,7 +176,7 @@ func runGet(cmd *base.Command, args []string) {
// in the hope that we can figure out the repository from the
// initial ...-free prefix.
func downloadPaths(args []string) []string {
- args = load.ImportPathsNoDotExpansion(args)
+ args = load.ImportPathsForGoGet(args)
var out []string
for _, a := range args {
if strings.Contains(a, "...") {
@@ -179,9 +185,9 @@ func downloadPaths(args []string) []string {
// warnings. They will be printed by the
// eventual call to importPaths instead.
if build.IsLocalImport(a) {
- expand = load.MatchPackagesInFS(a)
+ expand = search.MatchPackagesInFS(a)
} else {
- expand = load.MatchPackages(a)
+ expand = search.MatchPackages(a)
}
if len(expand) > 0 {
out = append(out, expand...)
@@ -271,9 +277,9 @@ func download(arg string, parent *load.Package, stk *load.ImportStack, mode int)
// for p has been replaced in the package cache.
if wildcardOkay && strings.Contains(arg, "...") {
if build.IsLocalImport(arg) {
- args = load.MatchPackagesInFS(arg)
+ args = search.MatchPackagesInFS(arg)
} else {
- args = load.MatchPackages(arg)
+ args = search.MatchPackages(arg)
}
isWildcard = true
}