All Downloads are FREE. Search and download functionalities are using the official Maven repository.

common.version.version.go Maven / Gradle / Ivy

The newest version!
package version

import (
	"fmt"
	"runtime/debug"
)

var version = func() string {
	ver := "2.9.1"
	if info, ok := debug.ReadBuildInfo(); ok {
		for _, setting := range info.Settings {
			if setting.Key == "vcs.revision" {
				return fmt.Sprintf("%v (%v)", ver, setting.Value[:8])
			}
		}
	}
	return ver
}()

func GetVersion() string {
	return version
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy