os

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: LGPL-3.0 Imports: 4 Imported by: 39

README

os

Host OS ans Series abstractions.

Documentation

Overview

Package os provides access to operating system related configuration.

Index

Constants

This section is empty.

Variables

View Source
var HostOS = hostOS // for monkey patching

Functions

func ReadOSRelease

func ReadOSRelease(f string) (map[string]string, error)

ReadOSRelease parses the information in the os-release file.

See http://www.freedesktop.org/software/systemd/man/os-release.html.

Types

type OSType

type OSType int
const (
	Unknown OSType = iota
	Ubuntu
	Windows
	OSX
	CentOS
	GenericLinux
	OpenSUSE
	Kubernetes
)

func (OSType) EquivalentTo

func (t OSType) EquivalentTo(t2 OSType) bool

EquivalentTo returns true if the OS type is equivalent to another OS type.

func (OSType) IsLinux

func (t OSType) IsLinux() bool

IsLinux returns true if the OS type is a Linux variant.

func (OSType) String

func (t OSType) String() string

Directories

Path Synopsis
series provides helpers for determining the series of a host, and translating from os to series.
series provides helpers for determining the series of a host, and translating from os to series.

Jump to

Keyboard shortcuts

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