osinfo

package
v0.0.0-...-5eebc06 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 8 Imported by: 2

Documentation

Overview

Package osinfo provides basic system info functions for Windows and Linux.

Index

Constants

View Source
const (
	// Linux is the default shortname used for a Linux system.
	Linux = "linux"
	// Windows is the default shortname used for Windows system.
	Windows = "windows"
)

Variables

This section is empty.

Functions

func Architecture

func Architecture(arch string) string

Architecture attempts to standardize architecture naming.

Types

type OSInfo

type OSInfo struct {
	Hostname, LongName, ShortName, Version, KernelVersion, KernelRelease, Architecture string
}

OSInfo describes an operating system.

func Get

func Get() (*OSInfo, error)

Get reports OSInfo.

Jump to

Keyboard shortcuts

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