Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var All = []Type{ Debian, Ubuntu, RedHat, CentOS, Fedora, Alpine, Busybox, AmazonLinux, OracleLinux, ArchLinux, OpenSuseLeap, SLES, Photon, Windows, Mariner, RockyLinux, }
All contains all Linux distribution options
View Source
var IDMapping = map[string]Type{ "debian": Debian, "ubuntu": Ubuntu, "rhel": RedHat, "centos": CentOS, "fedora": Fedora, "alpine": Alpine, "busybox": Busybox, "amzn": AmazonLinux, "ol": OracleLinux, "arch": ArchLinux, "opensuse-leap": OpenSuseLeap, "sles": SLES, "photon": Photon, "windows": Windows, "mariner": Mariner, "rocky": RockyLinux, }
IDMapping connects a distro ID like "ubuntu" to a Distro type
Functions ¶
This section is empty.
Types ¶
type Distro ¶
Distro represents a Linux Distribution.
func Identify ¶
func Identify(resolver source.FileResolver) *Distro
Identify parses distro-specific files to determine distro metadata like version and release.
func (Distro) FullVersion ¶
FullVersion returns the original user version value.
func (Distro) MajorVersion ¶
MajorVersion returns the major version value from the pseudo-semantically versioned distro version value.
type Type ¶
type Type string
Type represents the different Linux distribution options
const ( // represents the set of valid/supported Linux Distributions UnknownDistroType Type = "UnknownDistroType" Debian Type = "debian" Ubuntu Type = "ubuntu" RedHat Type = "redhat" CentOS Type = "centos" Fedora Type = "fedora" Alpine Type = "alpine" Busybox Type = "busybox" AmazonLinux Type = "amazonlinux" OracleLinux Type = "oraclelinux" ArchLinux Type = "archlinux" OpenSuseLeap Type = "opensuseleap" SLES Type = "sles" Photon Type = "photon" Windows Type = "windows" Mariner Type = "mariner" RockyLinux Type = "rockylinux" )
Click to show internal directories.
Click to hide internal directories.