Getting the running Go version
• 1 min read
package main
import (
"log"
"runtime"
)
func main() {
log.Printf("Running Go: %s", runtime.Version())
}
Output: Running Go: go1.16.6
🏷
go
package main
import (
"log"
"runtime"
)
func main() {
log.Printf("Running Go: %s", runtime.Version())
}
Output: Running Go: go1.16.6