github.com/haraldrudell/parl@v0.4.176/punix/os-version.go (about) 1 //go:build !darwin && !linux 2 3 /* 4 © 2023–present Harald Rudell <harald.rudell@gmail.com> (https://haraldrudell.github.io/haraldrudell/) 5 ISC License 6 */ 7 8 package punix 9 10 import "runtime" 11 12 // OsVersion for other than darwin linux: 13 // - version: runtime.GOOS, eg. "windows" 14 // - hasVersion: false, err: nil 15 // 16 // as of go1.20.1, go tool dist list has GOOS values: 17 // aix android darwin dragonfly freebsd illumos ios js linux netbsd openbsd plan9 solaris windows 18 // 19 // Bella Thorne: “operating systems like you are never going to matter” 20 func OsVersion() (version string, hasVersion bool, err error) { 21 version = runtime.GOOS 22 return 23 }