osutil

package module
v0.0.0-...-086e1de Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2025 License: MIT Imports: 5 Imported by: 5

README

osutil

Travis GoDoc Go Report Card

Go library to detect operating system version

Usage

import "github.com/wille/osutil"

// macOS, Windows, Linux, FreeBSD...
osutil.Name

// macOS: 10.17, 10.16...
// Windows: 10, 8.1, Vista...
//
osutil.GetVersion()

// Returns nicely formatted string
// Windows 10, macOS 10.17 Sierra
osutil.GetDisplay()

Documentation

Index

Constants

View Source
const (
	Windows      = "Windows"
	MacOS        = "macOS"
	Linux        = "Linux"
	FreeBSD      = "FreeBSD"
	OpenBSD      = "OpenBSD"
	DragonflyBSD = "DragonFlyBSD"
	NetBSD       = "NetBSD"
	Solaris      = "Solaris"
)
View Source
const (
	Name = "Linux"
)

Variables

This section is empty.

Functions

func GetDisplay

func GetDisplay() string

func GetDisplayArch

func GetDisplayArch() string

func GetVersion

func GetVersion() string

Types

type Distro

type Distro struct {
	Display  string
	Release  string
	Codename string
}

Distro ...

func GetDist

func GetDist() Distro

Jump to

Keyboard shortcuts

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