release

package module
v0.0.0-...-36114e1 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2016 License: MIT Imports: 6 Imported by: 0

README

Release Build Status GoDoc Go Report Card

Get OS type/name/version

Since golang standard library doesn't have methods/constants which could provide os info :/


// Depending on the system

// "osx"
release.Type()

// "El Capitan"
release.Name()

// "10.11.6"
release.Version()

// "osx", "El Capitan", "10.11.6"
release.All()

Documentation

Overview

Package release get OS type/name/version

Index

Constants

This section is empty.

Variables

View Source
var (

	// GOOS is reference to runtime.GOOS (needed for tests)
	GOOS = runtime.GOOS
)

Functions

func All

func All() (typa, name, version string)

All gets all avaliable info

func LSBRelease

func LSBRelease() string

LSBRelease executes `lsb_release -a` command (exposed for tests)

func Name

func Name() (name string)

Name gets os name

func Type

func Type() (typa string)

Type gets type version

func Uname

func Uname() string

Uname executes `uname -a` command (exposed for tests)

func Version

func Version() (version string)

Version gets os version

Types

This section is empty.

Directories

Path Synopsis
Package hollow gets hollow type/name/version
Package hollow gets hollow type/name/version
Package linux gets linux type/name/version
Package linux gets linux type/name/version
Package osx gets osx type/name/version
Package osx gets osx type/name/version

Jump to

Keyboard shortcuts

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