diff options
| author | Michael Matloob <matloob@golang.org> | 2024-06-21 14:35:14 -0400 |
|---|---|---|
| committer | Michael Matloob <matloob@golang.org> | 2024-06-21 19:58:04 +0000 |
| commit | d79c350916c637de911d93af689a5e4e7ab5a5bb (patch) | |
| tree | 5e11b9099c03e3b33588d4604f8189b3c6d69e69 /src/cmd/vet | |
| parent | 52ce25b44e8c21f62e95b12497db3036c5bd27c3 (diff) | |
| download | go-d79c350916c637de911d93af689a5e4e7ab5a5bb.tar.xz | |
cmd/internal: separate counter package from telemetry package
Move the code that opens and increments counters out of the
cmd/internal/telemetry package into cmd/internal/telemetry/counter. The
telemetry package has dependencies on the upload code, which we do not
want to pull into the rest of the go toolchain.
For #68109
Change-Id: I463c106819b169177a783de4a7d93377e81f4e3e
Reviewed-on: https://go-review.googlesource.com/c/go/+/593976
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/vet')
| -rw-r--r-- | src/cmd/vet/main.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/vet/main.go b/src/cmd/vet/main.go index 84821d43fc..3ace8ad689 100644 --- a/src/cmd/vet/main.go +++ b/src/cmd/vet/main.go @@ -6,7 +6,7 @@ package main import ( "cmd/internal/objabi" - "cmd/internal/telemetry" + "cmd/internal/telemetry/counter" "flag" "golang.org/x/tools/go/analysis/unitchecker" @@ -47,10 +47,10 @@ import ( ) func main() { - telemetry.OpenCounters() + counter.Open() objabi.AddVersionFlag() - telemetry.Inc("vet/invocations") + counter.Inc("vet/invocations") unitchecker.Main( appends.Analyzer, asmdecl.Analyzer, @@ -89,5 +89,5 @@ func main() { // It's possible that unitchecker will exit early. In // those cases the flags won't be counted. - telemetry.CountFlags("vet/flag:", *flag.CommandLine) + counter.CountFlags("vet/flag:", *flag.CommandLine) } |
