Esempio n. 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)
	})
}
Esempio n. 2
0
File: main.go Progetto: 2722/lantern
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)
}