Documentation
¶
Overview ¶
Package osrelease package provides access to parsed os-release information
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSRelease ¶
type OSRelease struct {
NAME string // OS Identifier
VERSION string // Full OS Version
ID string // Lowercase OS identifier
ID_LIKE string // Coma seperated list of closely related OSes
VERSION_ID string // Lowercase OS version
VERSION_CODENAME string // Lowercase OS release codename
PRETTY_NAME string // Human presented OS/Release name
ANSI_COLOR string // Suggested color for showing OS name
CPE_NAME string // See http://scap.nist.gov/specifications/cpe/
HOME_URL string // Main link for the OS
BUG_REPORT_URL string // Bug report link for the OS
PRIVACY_POLICY_URL string // Privacy policy link for the OS
VARIANT string // Human presnted OS Variant
VARIANT_ID string // Lowercase OS Variant identifier
ADDITIONAL_FIELDS map[string]string // Custom/unsupported fields
// contains filtered or unexported fields
}
OSRelease implements the format noted at https://www.freedesktop.org/software/systemd/man/os-release.html
func New ¶
New creates and returns a new insance of OSRelease. Generally New should be used to create a new instance.
func NewWithOverrides ¶
NewWithOverrides creates and returns a new instance of OSRelease using the paths passed in.
func (*OSRelease) GetField ¶
GetField returns a field from the instance. If the field is not present then an error us returned.
Click to show internal directories.
Click to hide internal directories.