hey brad, is it possible to have a ```goimports version``` so that we know what versions we currently have?
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/811798e7-2a10-460b-892d-f214aefdeaf2n%40googlegroups.com.
I have a need to (programatically) check what version of `goimports` someone has installed on their system.
> go version -m /opt/bin/goimports/opt/bin/goimports: go1.23.0mod golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24=dep golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0=dep golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ=build -buildmode=exebuild -compiler=gcbuild DefaultGODEBUG=asynctimerchan=1,gotypesalias=0,httplaxcontentlength=1,httpmuxgo121=1,httpservecontentkeepheaders=1,panicnil=1,tls10server=1,tls3des=1,tlskyber=0,tlsrsakex=1,tlsunsafeekm=1,winreadlinkvolume=0,winsymlink=0,x509keypairleaf=0,x509negativeserial=1build CGO_ENABLED=1build CGO_CFLAGS=build CGO_CPPFLAGS=build CGO_CXXFLAGS=build CGO_LDFLAGS=build GOARCH=arm64build GOOS=darwinbuild GOARM64=v8.0
/opt/bin/goimports: go1.23.0path golang.org/x/tools/cmd/goimportsmod golang.org/x/tools v0.26.0 h1:v/60pFQmzmT9ExmjDv2gGIfi3OqfKoEP6I5+umXlbnQ=...
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CABx2%3DD-uBkK%2B%2B8BSvdxxmYOQFxvGo5N%3D5qzKnvtHh0XwMqyiww%40mail.gmail.com.
And, obviously, how do you handle a command named "goimports" installed by the user that is not from the golang.org/x/tools repository.
I tried it out and the format parsed by debug.ParseBuildInfo is almost exactly what is output by go version -m:(and yes, my goimports version is old)