Closed n-oden closed 5 days ago
I would love that!
There are so many tools with the frustrating "Dev" version
Thanks for the approval! Can someone merge this? I cannot.
I'm a random Gopher. You will have to wait for a maintainer review
For the record if anyone would like to kick the tires on this, https://github.com/incu6us/goimports-reviser/pull/160 and https://github.com/incu6us/goimports-reviser/pull/159, I've made a build containing all three patches available as github.com/odenio/goimports-reviser/v3@v3.6.6-pre6
.
I don't intend to maintain a long-lived fork here, but I understand that the maintainer may have bigger fish to fry at the moment, residing in Ukraine.
@incu6us would you mind reviewing this?
Thank you!
Thank you!
Thank you for your contribution!
This addresses https://github.com/incu6us/goimports-reviser/issues/155
If we are installed via
go-install
rather than downloading a tagged binary from github, theTag
etc variables will all be empty, and therefore the--version
flag is diked out. But there is a way around this!If the version info is not filled in via build-time flags, use
debug.BuildInfo
to introspect as much information as we can out of the module metadata:Additionally, add a
--version-only
flag that prints only the version string itself, handy for use in shell pipelines. Can be used on its own or in combination with the--version
flag: