hostos

package
v0.0.0-...-f2020ed Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: Apache-2.0, MIT Imports: 6 Imported by: 0

Documentation

Overview

Package hostos contains utility functions for getting information about the host OS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Version

type Version struct {
	// contains filtered or unexported fields
}

Version represents a semantic version of the form "%d.%d[.%d]".

func KernelVersion

func KernelVersion() (Version, error)

KernelVersion returns the version of the kernel using uname().

func (Version) AtLeast

func (vr Version) AtLeast(major, minor int) bool

AtLeast returns whether vr is at least version major.minor.

func (Version) LessThan

func (vr Version) LessThan(major, minor int) bool

LessThan returns whether vr is less than version major.minor.

func (Version) String

func (vr Version) String() string

String implements fmt.Stringer.

Jump to

Keyboard shortcuts

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