osversion

package
v0.0.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinuxOSReleaseID        = "ID"
	LinuxOSReleaseVersionID = "VERSION_ID"
	LinuxOSReleaseCodename  = "VERSION_CODENAME"
)
View Source
const (
	MacOSProductName = "ProductName"
	MacOSVersion     = "ProductUserVisibleVersion"
)

Variables

View Source
var ErrOSVersionNotSupported = errors.New("os version introspection is not supported")
View Source
var MacOSCodeNames = map[uint64]string{
	11: "big sur",
	12: "monterey",
	13: "ventura",
}

Functions

This section is empty.

Types

type OSVersion

type OSVersion struct {
	ID       string
	Version  string
	Codename string
	Major    uint64
	Minor    uint64
}

func Get

func Get() (OSVersion, error)

func ParseLinuxOSRelease

func ParseLinuxOSRelease(path string) (OSVersion, error)

func ParseMacOSPlist

func ParseMacOSPlist(path string) (OSVersion, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL