aboutsummaryrefslogtreecommitdiff
path: root/src/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmd')
-rw-r--r--src/cmd/go/internal/vcs/vcs.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cmd/go/internal/vcs/vcs.go b/src/cmd/go/internal/vcs/vcs.go
index 0822844127..26b103b1d0 100644
--- a/src/cmd/go/internal/vcs/vcs.go
+++ b/src/cmd/go/internal/vcs/vcs.go
@@ -27,6 +27,7 @@ import (
"cmd/go/internal/str"
"cmd/go/internal/web"
"cmd/internal/pathcache"
+ "cmd/internal/telemetry/counter"
"golang.org/x/mod/module"
)
@@ -872,6 +873,12 @@ func RepoRootForImportPath(importPath string, mod ModuleMode, security web.Secur
rr = nil
err = importErrorf(importPath, "cannot expand ... in %q", importPath)
}
+
+ // Record telemetry about which VCS was used.
+ if err == nil {
+ counter.Inc("go/vcs:" + rr.VCS.Name)
+ }
+
return rr, err
}