Re: [go-nuts] Check for minimum Go version

2017-08-10 Thread Michael Banzon
Thanks for the responses. I will try a few options and see what fit best. For a bit of context I’m making a script to check if the entire toolchain needed to build a project is present on the machine. The script checks for node/npm, Go, GCC and a few other tools (like go-bindata eg.). The real

Re: [go-nuts] Check for minimum Go version

2017-08-10 Thread Konstantin Khomoutov
On Wed, Aug 09, 2017 at 03:11:48PM +0200, Michael Banzon wrote: > Is there a way to have a (bash) script check if the version of the Go > compiler installed is a specific minimum version? In the light of [1], I think you could combine checking of the presense of the `go` tool itself with build

Re: [go-nuts] Check for minimum Go version

2017-08-09 Thread 'Chris Manghane' via golang-nuts
You might want to follow the discussion in golang.org/issue/21207 which might be related to this, depending on the reason you need to know the minimum Go version. `go version` doesn't return the version number on non-tagged releases so if you're building off of tip, for example, the output is a

Re: [go-nuts] Check for minimum Go version

2017-08-09 Thread Shawn Milochik
Running "go version" at the command line returns a version number. You can parse that. -- 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

[go-nuts] Check for minimum Go version

2017-08-09 Thread Michael Banzon
Hi, Is there a way to have a (bash) script check if the version of the Go compiler installed is a specific minimum version? -- Michael Banzon https://michaelbanzon.com/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from