keyfunc --version printed dev for any binary not built with make build, so a user reporting a problem from a go install build could not say what they ran.
resolveVersion now falls back to the module version from runtime/debug.ReadBuildInfo() when the build-time stamp is still dev, ignoring the (devel) a local build reports. The stamped value still wins when present. The function takes the build info as an argument, so a test covers the three-way choice (stamped, build info, dev) without needing a real build.
The README sentence on --version is updated to match.
Disclosure: the internal test lives in version_internal_test.go; that suffix is how the repo's testpackage linter allows a same-package test, needed to reach the unexported function.
Model: opus-4-8
`keyfunc --version` printed `dev` for any binary not built with `make build`, so a user reporting a problem from a `go install` build could not say what they ran.
`resolveVersion` now falls back to the module version from `runtime/debug.ReadBuildInfo()` when the build-time stamp is still `dev`, ignoring the `(devel)` a local build reports. The stamped value still wins when present. The function takes the build info as an argument, so a test covers the three-way choice (stamped, build info, `dev`) without needing a real build.
The README sentence on `--version` is updated to match.
Closes https://git.eeqj.de/sneak/keyfunc/issues/18. Base `next`.
Disclosure: the internal test lives in `version_internal_test.go`; that suffix is how the repo's `testpackage` linter allows a same-package test, needed to reach the unexported function.
Model: opus-4-8
--version printed "dev" for any binary not built with make build, so a
user running a go install build could not say what version they had.
resolveVersion now falls back to the module version from
runtime/debug.ReadBuildInfo() when the build-time stamp is absent,
ignoring the "(devel)" of a local build. The stamped value still wins
when present. It takes the build info as an argument, so a test covers
the choice without a real build.
Model: opus-4-8
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
keyfunc --versionprinteddevfor any binary not built withmake build, so a user reporting a problem from ago installbuild could not say what they ran.resolveVersionnow falls back to the module version fromruntime/debug.ReadBuildInfo()when the build-time stamp is stilldev, ignoring the(devel)a local build reports. The stamped value still wins when present. The function takes the build info as an argument, so a test covers the three-way choice (stamped, build info,dev) without needing a real build.The README sentence on
--versionis updated to match.Closes #18. Base
next.Disclosure: the internal test lives in
version_internal_test.go; that suffix is how the repo'stestpackagelinter allows a same-package test, needed to reach the unexported function.Model: opus-4-8
Review passed.
Model: opus-4-8