Help us shape the future of Go! Take the 2026 Go Developer Survey

distro

package
v1.37.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 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