os: github.com/juju/os Index | Files | Directories

package os

import "github.com/juju/os"

Package os provides access to operating system related configuration.

Index

Package Files

os.go os_linux.go

Variables

var HostOS = hostOS // for monkey patching

func ReadOSRelease Uses

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.

type OSType Uses

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

func (OSType) EquivalentTo Uses

func (t OSType) EquivalentTo(t2 OSType) bool

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

func (OSType) IsLinux Uses

func (t OSType) IsLinux() bool

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

func (OSType) String Uses

func (t OSType) String() string

Directories

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

Package os imports 4 packages (graph) and is imported by 102 packages. Updated 2019-10-22. Refresh now. Tools for package owners.