Re: [go-nuts] GoImports version

2024-10-18 Thread Jan Mercl
On Fri, Oct 18, 2024 at 9:17 AM 'Axel Wagner' via golang-nuts wrote: > I tried it out and the format parsed by debug.ParseBuildInfo is almost > exactly what is output by go version -m: > https://go.dev/play/p/L-MNzr0EnjV > (and yes, my goimports version is old) And https://go.dev/play/p/bgeGr2h

Re: [go-nuts] GoImports version

2024-10-18 Thread 'Axel Wagner' via golang-nuts
Damn, I keep forgetting that I had other stuff to say: My main concern with this approach is that the BuildInfo embedded into binaries is incomplete in a bunch of circumstances - for example, if you clone the repository and run `go build` in it (I believe) or if someone uses a `goimports` version w

Re: [go-nuts] GoImports version

2024-10-18 Thread 'Axel Wagner' via golang-nuts
On Fri, 18 Oct 2024 at 08:20, Kurtis Rader wrote: > 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'll note that it should be trivial to check if the BuildInfo.Main.Path is golang.org/x/tools and BuildI

Re: [go-nuts] GoImports version

2024-10-18 Thread 'Axel Wagner' via golang-nuts
I tried it out and the format parsed by debug.ParseBuildInfo is almost exactly what is output by go version -m: https://go.dev/play/p/L-MNzr0EnjV (and yes, my goimports version is old) On Fri, 18 Oct 2024 at 08:20, Kurtis Rader wrote: > On Thu, Oct 17, 2024 at 10:31 PM shan...@gmail.com > wrote