platform

package
v0.0.0-...-19c0d85 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package platform provides symbolic constants for identifiying the operating system / distro and the corresponding package manager.

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownOS = errors.New("Unknown OS")

Functions

This section is empty.

Types

type System

type System uint8

System represents an operating system

const (
	FreeBSD System = iota
	OpenBSD
	NetBSD
	OpenSuse
	Debian
	Arch
	RedHat
)

These constants represents the various operating systems we aim to support. For systems that have derivatives, such as Debian, Ubuntu, Raspbian, or RHEL and Rocky Linux or Alma, we just use one constant, because the package manager is going to be the same.

func AllSystems

func AllSystems() []System

Returns a slice of all System constants.

func ParseSystem

func ParseSystem(str string) (System, error)

ParseSystem attempts to parse the name of an operating system and return the matching System constant.

Jump to

Keyboard shortcuts

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