gvisorgvisor.dev/gvisor/pkg/hostos Index | Files

package hostos

import "gvisor.dev/gvisor/pkg/hostos"

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

Index

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.

Source Files

hostos.go

Version
v0.0.0-20250605235530-a6711d1e1dc6 (latest)
Published
Jun 5, 2025
Platform
linux/amd64
Imports
6 packages
Last checked
4 hours ago

Tools for package owners.