Home Blog Links Now

Getting the running Go version

2021-07-07 go
package main

import (
    "log"
    "runtime"
)

func main() {
    log.Printf("Running Go: %s", runtime.Version())
}

Output: Running Go: go1.16.6