Swap atomic.Pointer[string] for a mutex-guarded string, atomic.Bool for the function-based sync/atomic int32 API, two range-over-int loops for classic index loops, and drop the init() that seeded the endpoint pointer. No public API or runtime behaviour change; go test, go vet, and golangci-lint all pass.
Rationale: the traefikoidc Traefik plugin vendors and interprets dependency source via Yaegi, which on several Traefik runtimes cannot interpret generic stdlib types or range-over-int. This keeps the package importable from that plugin without altering what it does.
Add SendForModule/ResolveModuleVersion helpers so consumers no longer
need to hand-maintain a bumped version constant; the library resolves
the running module version from runtime/debug.BuildInfo (Deps[] for
library consumers, Main for go-install'ed binaries) and falls back to
the caller-supplied string otherwise. Leading "v" is stripped to match
the canonical wire form the receiver stores.
Tighten validVersion: previously any [A-Za-z0-9._+-] passed client-side
but the receiver rejects anything that does not start with a digit, so
"dev"/"next"/"latest" pings were silently 400'd at the edge with no
client signal. Now validVersion enforces the same SemVer-ish shape as
the receiver (with optional leading v stripped), so junk versions drop
at the source without a wasted HTTP roundtrip. normalizeVersion strips
the leading v on the wire so callers may pass either form.
New tests cover the resolver fallback path, leading-v normalization,
and rejection of non-semver junk. Existing test contract (Send accepts
"v1.0.0", "1.0.0+meta", etc.) is preserved.
First CI run failed because:
- staticcheck v0.7.0, gosec, govulncheck (all @latest) require Go >= 1.25
- golangci-lint-action v6 does not support golangci-lint v2
Aligns Go version with the rest of the consumer projects (go-telegram,
mcp-filepuff, kportal, lolcathost all on 1.25.x).
Replicates the standard CI + release process from go-telegram:
- vet, staticcheck, govulncheck, gosec, golangci-lint, race-tested test
on every push and PR
- ci-success aggregator as the single required status check
- release job auto-fires on clean push to main: lukaszraczylo/semver-generator
computes next version from commit history, tags v<X.Y.Z>, and
`gh release create --generate-notes` publishes a GitHub release
oss-telemetry is library-only, so unlike go-telegram there is no
GoReleaser step and no binaries are attached — consumers continue to
go get github.com/lukaszraczylo/oss-telemetry@<tag>.
.semver.yaml mirrors the keyword set used in go-telegram (Conventional
Commits prefixes, BREAKING CHANGE for major).
Renames the README section from "How users disable telemetry" to
"Disabling telemetry" so consumer projects can link to a clean,
stable URL fragment (#disabling-telemetry) instead of duplicating the
opt-out table in each downstream README.
Anonymous OSS usage telemetry library with zero third-party deps.
- Send(project, version): fire-and-forget POST to oss.raczylo.com/v1/ping
- Disable() and Wait(timeout) helpers
- Disable via DO_NOT_TRACK, OSS_TELEMETRY_DISABLED, or per-project env
- Failproof: never blocks, never panics, never returns errors
- Hand-written JSON (no encoding/json) and byte-loop validators (no regexp)
- golangci-lint v2 clean, all tests pass with -race