package osutil
import "github.com/tredoe/osutil"
Package sys defines operating systems and detects the Linux distribution.
Index ¶
- Variables
- func SystemFromGOOS() (sys System, dist Distro, err error)
- type Distro
- func DetectDistro() (Distro, error)
- func (d Distro) Manager() pkg.Manager
- func (s Distro) String() string
- type System
Variables ¶
var ListSystem = [...]System{FreeBSD, Linux, MacOS, Windows}
ListSystem is the list of allowed operating systems.
Functions ¶
func SystemFromGOOS ¶
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.
Most used Linux distributions.
func DetectDistro ¶
DetectDistro returns the Linux distribution.
func (Distro) Manager ¶
Manager returns the package manager.
func (Distro) String ¶
type System ¶
type System uint8
System represents an operating system.
The operating systems.
func (System) Manager ¶
Manager returns the package manager.
func (System) String ¶
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
config | |
config/shconf | Package shconf implements a parser and scanner for the configuration in format shell-variable. |
edi | Package edi allows edit files. |
executil | Package executil lets to call to system commands. |
fileutil | Package fileutil handles common operations in files. |
pkg | Package pkg handles basic operations in the management of packages in FreeBSD, Linux and macOs operating systems. |
userutil | Package userutil provides access to UNIX users database in local files. |
userutil/crypt | Package crypt provides interface for password crypt functions and collects common constants. |
userutil/crypt/apr1_crypt | Package apr1_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD, and modified by the Apache project. |
userutil/crypt/common | Package common contains routines used by multiple password hashing algorithms. |
userutil/crypt/md5_crypt | Package md5_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD. |
userutil/crypt/sha256_crypt | Package sha256_crypt implements Ulrich Drepper's SHA256-crypt password hashing algorithm. |
userutil/crypt/sha512_crypt | Package 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.