osutil – github.com/tredoe/osutil Index | Files | Directories

package osutil

import "github.com/tredoe/osutil"

Package sys defines operating systems and detects the Linux distribution.

Index

Variables

var ListSystem = [...]System{FreeBSD, Linux, MacOS, Windows}

ListSystem is the list of allowed operating systems.

Functions

func SystemFromGOOS

func SystemFromGOOS() (sys System, dist Distro, err error)

SystemFromGOOS returns the system from 'GOOS', and the distribution at Linux systems.

Types

type Distro

type Distro int

Distro represents a distribution of Linux system.

const (
	DistroUnknown Distro = iota

	Debian
	Ubuntu

	Fedora
	CentOS

	OpenSUSE

	Arch
	Manjaro
)

Most used Linux distributions.

func DetectDistro

func DetectDistro() (Distro, error)

DetectDistro returns the Linux distribution.

func (Distro) Manager

func (d Distro) Manager() pkg.Manager

Manager returns the package manager.

func (Distro) String

func (s Distro) String() string

type System

type System uint8

System represents an operating system.

const (
	SystemUndefined System = iota
	Linux
	FreeBSD
	MacOS
	Windows
)

The operating systems.

func (System) Manager

func (s System) Manager(dist Distro) pkg.Manager

Manager returns the package manager.

func (System) String

func (s System) String() string

Source Files

distro.go system.go

Directories

PathSynopsis
config
config/shconfPackage shconf implements a parser and scanner for the configuration in format shell-variable.
ediPackage edi allows edit files.
executilPackage executil lets to call to system commands.
fileutilPackage fileutil handles common operations in files.
pkgPackage pkg handles basic operations in the management of packages in FreeBSD, Linux and macOs operating systems.
userutilPackage userutil provides access to UNIX users database in local files.
userutil/cryptPackage crypt provides interface for password crypt functions and collects common constants.
userutil/crypt/apr1_cryptPackage apr1_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD, and modified by the Apache project.
userutil/crypt/commonPackage common contains routines used by multiple password hashing algorithms.
userutil/crypt/md5_cryptPackage md5_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD.
userutil/crypt/sha256_cryptPackage sha256_crypt implements Ulrich Drepper's SHA256-crypt password hashing algorithm.
userutil/crypt/sha512_cryptPackage sha512_crypt implements Ulrich Drepper's SHA512-crypt password hashing algorithm.
Version
v1.1.2
Published
Aug 2, 2021
Platform
js/wasm
Imports
5 packages
Last checked
now

Tools for package owners.