linux

package
v0.0.0-...-f0b4a20 Latest Latest
Warning

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

Go to latest
Published: Dec 14, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distribution

type Distribution int

Distribution represents the linux distribution

const (

	// AlpineLinux refers to alpine linux distributions
	AlpineLinux Distribution
	// DebianLinux refers to debian linux distributions
	DebianLinux
	// UbuntuLinux refers to ubuntu linux distributions
	UbuntuLinux
	// FedoraLinux refers to fedora linux distributions
	FedoraLinux
	// GenericLinux refers to a generic linux distribution
	GenericLinux
)

func ParseDistributionID

func ParseDistributionID(id string) Distribution

ParseDistributionID parses a distribution id

func (Distribution) String

func (d Distribution) String() string

type OSRelease

type OSRelease struct {
	ID              Distribution
	Name            string
	PrettyName      string
	Version         string
	VersionCodename string
	Extra           map[string]string
}

OSRelease represents system information https://www.freedesktop.org/software/systemd/man/os-release.html

func ParseOSRelease

func ParseOSRelease(in string) (*OSRelease, error)

ParseOSRelease parses an os-release find

func (*OSRelease) String

func (o *OSRelease) String() string

Jump to

Keyboard shortcuts

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