distro

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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
}

OSRelease contains information from an os-release file

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 first time it's called, it'll parse the os-release file. Subsequent calls will return the same value.

Jump to

Keyboard shortcuts

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