mirror of
https://github.com/lukaszraczylo/go-telegram.git
synced 2026-07-12 02:21:15 +00:00
feat(telemetry): switch to SendForModule, drop hand-bumped Version
Replaces the hand-bumped client.Version="0.7.11" with telemetry.SendForModule which reads the actual module version from runtime/debug.BuildInfo.Deps at the consumer's build time. This means future releases (v0.7.12, v0.8.0, …) will be reported by the running bot WITHOUT requiring a manual edit of client/version.go on every tag — consumers just `go get -u` and rebuild. client.Version is preserved as a fallback for replace directives / detached `go run`, and remains overridable via -ldflags. Bumps oss-telemetry to v0.2.1.
This commit is contained in:
+1
-1
@@ -28,6 +28,6 @@ var telemetryOnce sync.Once
|
||||
// See README §Telemetry for the full disclosure.
|
||||
func fireTelemetryOnce() {
|
||||
telemetryOnce.Do(func() {
|
||||
telemetry.Send("go-telegram", Version)
|
||||
telemetry.SendForModule("go-telegram", "github.com/lukaszraczylo/go-telegram", Version)
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user