aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/pack/pack.go
diff options
context:
space:
mode:
authorMichael Matloob <matloob@golang.org>2024-06-21 14:35:14 -0400
committerMichael Matloob <matloob@golang.org>2024-06-21 19:58:04 +0000
commitd79c350916c637de911d93af689a5e4e7ab5a5bb (patch)
tree5e11b9099c03e3b33588d4604f8189b3c6d69e69 /src/cmd/pack/pack.go
parent52ce25b44e8c21f62e95b12497db3036c5bd27c3 (diff)
downloadgo-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/pack/pack.go')
-rw-r--r--src/cmd/pack/pack.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cmd/pack/pack.go b/src/cmd/pack/pack.go
index 28f217ace1..4ac6ce995f 100644
--- a/src/cmd/pack/pack.go
+++ b/src/cmd/pack/pack.go
@@ -6,7 +6,7 @@ package main
import (
"cmd/internal/archive"
- "cmd/internal/telemetry"
+ "cmd/internal/telemetry/counter"
"fmt"
"io"
"io/fs"
@@ -31,7 +31,7 @@ func usage() {
func main() {
log.SetFlags(0)
log.SetPrefix("pack: ")
- telemetry.OpenCounters()
+ counter.Open()
// need "pack op archive" at least.
if len(os.Args) < 3 {
log.Print("not enough arguments")
@@ -39,8 +39,8 @@ func main() {
usage()
}
setOp(os.Args[1])
- telemetry.Inc("pack/invocations")
- telemetry.Inc("pack/op:" + string(op))
+ counter.Inc("pack/invocations")
+ counter.Inc("pack/op:" + string(op))
var ar *Archive
switch op {
case 'p':