We can use runtime.Version function to print Go Version.
runtime.Version
package main import ( "fmt" "runtime" ) func main() { fmt.Println("Go version: " + runtime.Version()) }
Source: GopherSnippets
Last updated 4 months ago