Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VersionInfo ¶
type VersionInfo struct { Kernel int // Version of the kernel (e.g. 4.1.2-generic -> 4) Major int // Major part of the kernel version (e.g. 4.1.2-generic -> 1) Minor int // Minor part of the kernel version (e.g. 4.1.2-generic -> 2) Flavor string // Flavor of the kernel version (e.g. 4.1.2-generic -> generic) }
VersionInfo holds information about the kernel.
func GetKernelVersion ¶
func GetKernelVersion() (*VersionInfo, error)
GetKernelVersion returns the kernel version info.
func (*VersionInfo) String ¶
func (k *VersionInfo) String() string
String returns the kernel version's string format.
Click to show internal directories.
Click to hide internal directories.