func init()

in common/version.go [111:136]


func init() {
	info, ok := debug.ReadBuildInfo()
	if ok {
		if AppVersion.Version == "" {
			AppVersion.Version = info.Main.Version
		}

		for _, setting := range info.Settings {
			switch {
			case setting.Key == "vcs.revision" && AppVersion.Revision == "" && len(setting.Value) >= 8:
				AppVersion.Revision = setting.Value[:8]

			case setting.Key == "vcs.time" && AppVersion.BuiltAt == "":
				AppVersion.BuiltAt = setting.Value
			}
		}
	}

	if AppVersion.Version == "" || AppVersion.Version == "(devel)" {
		AppVersion.Version = "development version"
	}

	if AppVersion.Revision == "" {
		AppVersion.Revision = "HEAD"
	}
}