osrelease

package module
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package osrelease parse /etc/os-release More about the os-release: https://www.linux.org/docs/man5/os-release.html

Index

Constants

This section is empty.

Variables

View Source
var Path = "/etc/os-release"

Path contains the default path to the os-release file

Functions

func Parse

func Parse() error

Parse parses the os-release file pointing to by Path. The fields are saved into the Release global variable.

Types

type OSRelease

type OSRelease struct {
	Name             string
	Version          string
	ID               string
	IDLike           string
	PrettyName       string
	VersionID        string
	HomeURL          string
	DocumentationURL string
	SupportURL       string
	BugReportURL     string
	PrivacyPolicyURL string
	VersionCodename  string
	UbuntuCodename   string
	ANSIColor        string
	CPEName          string
	BuildID          string
	Variant          string
	VariantID        string
}
var Release OSRelease

Jump to

Keyboard shortcuts

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