func initVersion() {
	if *versionFlag {
		fmt.Println(VersionInfo())
		os.Exit(0)
	}
}
Init prints version information and exits, if --version option passed.
package main
import (
	"flag"
	"fmt"
	"os"
	"runtime"
	"time"
)
var (
	Version string = "0.0.0"
	VersionTag string
	VersionDate string
	VersionSHA string
	versionFlag = flag.Bool("version", false, "display version information")
)