telemetryEnv reports which environment the events belong to: "prod" for release builds (goreleaser injects a semver version), "dev" for source builds (the version stays "main").
()
| 102 | // release builds (goreleaser injects a semver version), "dev" for source |
| 103 | // builds (the version stays "main"). |
| 104 | func telemetryEnv() string { |
| 105 | if version.Version == "main" { |
| 106 | return "dev" |
| 107 | } |
| 108 | return "prod" |
| 109 | } |
| 110 | |
| 111 | // anonymousID is a unique identifier for an anonymous user of the CLI (basically the hash of the mac address) |
| 112 | func anonymousID() string { |
no outgoing calls