One of those “duh” moments: “go –version” says there is no “go -version”, but there is “go version”
Posted by jpluimers on 2018/03/20
One of those “duh” moments: go --version says there is no go -version, but there is go version as shown below.
It is even at [WayBack] Print Go version right in the middle of this 30 page [WayBack] go – The Go Programming Language.
On the hunt for that, I found this very interesting link for when you have binaries built with go and need the version: [WayBack] How to find out which Go version built your binary | Dave Cheney.
$ go --version
flag provided but not defined: -version
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files and cached files
doc show documentation for package or symbol
env print Go environment information
bug start a bug report
fix update packages to use new APIs
fmt gofmt (reformat) package sources
generate generate Go files by processing source
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet report likely mistakes in packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
buildmode build modes
cache build and test caching
filetype file types
gopath GOPATH environment variable
environment environment variables
importpath import path syntax
packages package lists
testflag testing flags
testfunc testing functions
Use "go help [topic]" for more information about that topic.
–jeroen






Leave a comment