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 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 DTRevision ¶
func DTRevision() uint32
DTRevision returns the device revision (e.g. a02082 for the Raspberry Pi 3) from the Linux device tree, or 0 if the file is missing or malformed.
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.
func IsRaspbian ¶
func IsRaspbian() bool
IsRaspbian returns true if running on a Raspbian distribution.
func IsUbuntu ¶
func IsUbuntu() bool
IsUbuntu returns true if running on an Ubuntu derived distribution.
func OSRelease ¶
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.