osinfo

package
v0.0.61 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2025 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AllSupportedDistros = []string{
	"ubuntu",
	"debian",
	"fedora",
	"opensuse",
	"centos",
	"rocky",
	"almalinux",
}

List of distros we officially support

View Source
var AllSupportedDistrosVersions = map[string][]string{
	"almalinux": {
		"9",
	},
	"rocky": {
		"9",
	},
	"ubuntu": {
		"22.04",
		"24.04",
		"24.10",
		"25.04",
	},
	"debian": {
		"11",
		"12",
		"13",
	},
	"fedora": {
		"40",
		"41",
		"42",
	},
	"opensuse": {
		"15",
	},
	"centos": {
		"9",
		"10",
	},
}

Functions

func IsVersionSupported

func IsVersionSupported(distribution, version string) bool

IsVersionSupported checks compatibility

Types

type OSInfo

type OSInfo struct {
	Distribution string
	Version      string
	VersionID    string
	PrettyName   string
	Architecture string
}

OSInfo contains OS details

func GetOSInfo

func GetOSInfo() (*OSInfo, error)

GetOSInfo figures out what we're running on

Jump to

Keyboard shortcuts

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