kversion

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package kversion fetches the linux kernel version, and parse them with semantic versioning.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version uint64

Version stores the kernel version using semantic versioning, but converted to a 64bit numeric value.

var Current Version

Current is the version retrieved when the process has just been initialized.

func Must

func Must(version string) Version

Must forcefully parses the version and panics if the version specified cannot resolve.

func Parse

func Parse(version string) (Version, error)

Parse the specified kernel version.

func (Version) Major

func (v Version) Major() int64

Major returns the value of the major version.

func (Version) Minor

func (v Version) Minor() int64

Minor returns the value of the minor version.

func (Version) Patch

func (v Version) Patch() int64

Patch returns the value of the patch version.

func (Version) PreRelease

func (v Version) PreRelease() int64

PreRelease returns the value of the pre-release version.

func (Version) String

func (v Version) String() string

String formats the kernel version as triplets.

Jump to

Keyboard shortcuts

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