distro

package
v3.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2018 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package distro implements common functionality to auto-detect features on the host; generally about linux distributions.

Most of the functions exported as in the form IsFoo() where Foo is a linux distribution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CPUInfo

func CPUInfo() map[string]string

CPUInfo returns parsed data from /proc/cpuinfo.

func DTCompatible

func DTCompatible() []string

DTCompatible returns platform compatibility info from the Linux device tree (/proc/device-tree/compatible), and returns []{"unknown"} on non-linux systems or if the file is missing.

func DTModel

func DTModel() string

DTModel returns platform model info from the Linux device tree (/proc/device-tree/model), and returns "unknown" on non-linux systems or if the file is missing.

func IsArmbian

func IsArmbian() bool

IsArmbian returns true if running on a Armbian distribution.

http://www.armbian.com/

func IsDebian

func IsDebian() bool

IsDebian returns true if running on an Debian derived distribution.

This function returns true on both Armbian, Raspbian and Ubuntu.

https://debian.org/

func IsRaspbian

func IsRaspbian() bool

IsRaspbian returns true if running on a Raspbian distribution.

https://raspbian.org/

func IsUbuntu

func IsUbuntu() bool

IsUbuntu returns true if running on an Ubuntu derived distribution.

https://ubuntu.com/

func OSRelease

func OSRelease() map[string]string

OSRelease returns parsed data from /etc/os-release.

For more information, see http://0pointer.de/public/systemd-man/os-release.html

Types

This section is empty.

Jump to

Keyboard shortcuts

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