Beispiel #1
0
func main() {
	// checkNetwork runs only once when the app first loads.
	app.Main(func(a app.App) {
		str, err := osversion.GetString()
		if err != nil {
			log.Println("Error")
		}
		log.Println(str)

		str, err = osversion.GetHumanReadable()
		if err != nil {
			log.Println("Error")
		}
		log.Println(str)
	})
}
Beispiel #2
0
func main() {
	str, err := osversion.GetString()
	if err != nil {
		log.Fatalf("Error getting OS version: %v", err)
	}
	log.Println(str)

	version, err := osversion.GetSemanticVersion()
	if err != nil {
		log.Fatalf("Error getting OS version: %v", err)
	}

	log.Println(version)

	hstr, err := osversion.GetHumanReadable()
	if err != nil {
		log.Fatalf("Error getting OS version: %v", err)
	}

	log.Println(hstr)
}