README

os

Host OS ans Series abstractions.

Expand ▾ Collapse ▴

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

          Source Files

          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.