distro

package
v1.12.6 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Distro

type Distro struct {
	ID         string
	IDLike     string
	PrettyName string
}

Distro holds information about the current Linux distribution.

func Detect

func Detect() (*Distro, error)

Detect parses /etc/os-release and returns the distro information.

func (*Distro) IsArch

func (d *Distro) IsArch() bool

IsArch returns true if the distro is Arch Linux or Arch-based.

func (*Distro) IsDebian

func (d *Distro) IsDebian() bool

IsDebian returns true if the distro is Debian or Debian-based.

func (*Distro) IsFedora

func (d *Distro) IsFedora() bool

IsFedora returns true if the distro is Fedora or Fedora-based.

Jump to

Keyboard shortcuts

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