distro

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrParse = errors.New("could not parse os-release file")

Functions

This section is empty.

Types

type OSRelease

type OSRelease struct {
	Name             string
	PrettyName       string
	ID               string
	Like             []string
	VersionID        string
	ANSIColor        string
	HomeURL          string
	DocumentationURL string
	SupportURL       string
	BugReportURL     string
}

func ParseOSRelease

func ParseOSRelease(ctx context.Context) (*OSRelease, error)

OSReleaseName returns a struct parsed from the system's os-release file. It checks /etc/os-release as well as /usr/lib/os-release. The returned OSRelease struct is a singleton.

Jump to

Keyboard shortcuts

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