Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DMIInfo ¶
type DMIInfo struct { // ProductName of the device, as read from /sys/class/dmi/id/product_name. // Eg: "21J50013US". ProductName string // ProductSerial of the device, as read from /sys/class/dmi/id/product_serial. // Eg: "PF0A0AAA". ProductSerial string // BoardSerial of the device, as read from /sys/class/dmi/id/board_serial. // Eg: "L1AA00A00A0". BoardSerial string // ChassisAssetTag of the device, as read from // /sys/class/dmi/id/chassis_asset_tag. // // May contain a variety of strings to denote an unset asset tag, such as // "No Asset Information", "Default string", etc (creativity is the limit, // really). // // Eg: "No Asset Information". ChassisAssetTag string }
DMIInfo holds information acquired from the device's DMI.
func DMIInfoFromFS ¶
DMIInfoFromFS reads DMI from dmifs as if it was rooted at /sys/class/dmi/id/.
The method reads as much information as possible, so it always returns a non-nil DMIInfo, even if it errors.
func DMIInfoFromSysfs ¶
DMIInfoFromSysfs reads DMI info from /sys/class/dmi/id/.
The method reads as much information as possible, so it always returns a non-nil DMIInfo, even if it errors.
type OSRelease ¶
OSRelease represents the information contained in the /etc/os-release file.
func ParseOSRelease ¶
ParseOSRelease reads the /etc/os-release contents.
Click to show internal directories.
Click to hide internal directories.