osinfo

package module
v0.0.0-...-e0e1b1e Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 5 Imported by: 2

README

Test Go Reference Go Report Card

osinfo

Go library to retrieve OS information.

Documentation

Index

Constants

View Source
const (
	// UnknownRelease returns when can't determinate os release.
	UnknownRelease = "unknown"
)

Variables

This section is empty.

Functions

func Release

func Release() string

Release returns release version of current running OS. It returns a default string if can't find.

Types

type OSInfo

type OSInfo struct {
	Name    string `json:"os" yaml:"os"`
	Version string `json:"version" yaml:"version"`
	Dist    string `json:"dist" yaml:"dist"`
	// contains filtered or unexported fields
}

OSInfo contains information of running OS.

func New

func New() (oi *OSInfo)

New returns an instance of OSInfo.

func (*OSInfo) Err

func (oi *OSInfo) Err() error

func (*OSInfo) String

func (oi *OSInfo) String() string

Jump to

Keyboard shortcuts

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