GopherSnippetsStar

Code snippets with tests and testable examples for the Go programming language

How to print Go version

Snippets Index - Run code on Go playground - Edit

package main

import (
	"fmt"
	"runtime"
)

func Example() {
	fmt.Printf("Go version: %s\n", runtime.Version())
	// Output:
	// Go version: go1.14.2
}

by psampaz - source code - comment below or here