osutil

package module
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2021 License: MPL-2.0 Imports: 2 Imported by: 0

README

osutil

Access to operating system functionality dependent of every platform.

  • config/env: set persistent environment variables
  • config/shconf: parser and scanner for the configuration in format shell-variable
  • edi: editing of files
  • executil: executes commands in shells
  • fileutil: handles common operations at files
  • sysutil: defines operating systems, detects Linux distributions and handles different package systems
  • userutil: provides access to UNIX users database in local files
  • user/crypt: password hashing used in UNIX

Documentation online

Testing

go test ./...

sudo env PATH=$PATH go test -v ./...

'sudo' command is necessary to copy the files '/etc/{passwd,group,shadow,gshadow}' to the temporary directory, where the tests are run. Also, it uses 'sudo' to check the package manager, at installing and removing the package 'nano'.

License

The source files are distributed under the Mozilla Public License, version 2.0, unless otherwise noted.
Please read the FAQ if you have further questions regarding the license.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupLogger

func SetupLogger(log, logShell *log.Logger)

SetupLogger setups the loggers used by some packages. 'log' is used by the packages 'edi', 'fileutil' and 'userutil'. 'logShell' is used by the packages 'executil' and 'pkg'.

Types

This section is empty.

Directories

Path Synopsis
config
env
Package env implements the setting of persistent environment variables.
Package env implements the setting of persistent environment variables.
shconf
Package shconf implements a parser and scanner for the configuration in format shell-variable.
Package shconf implements a parser and scanner for the configuration in format shell-variable.
Package edi allows edit files.
Package edi allows edit files.
Package executil lets to call to system commands.
Package executil lets to call to system commands.
Package fileutil handles common operations in files.
Package fileutil handles common operations in files.
Package sysutil defines operating systems and detects the Linux distribution.
Package sysutil defines operating systems and detects the Linux distribution.
Package userutil provides access to UNIX users database in local files.
Package userutil provides access to UNIX users database in local files.
crypt
Package crypt provides interface for password crypt functions and collects common constants.
Package crypt provides interface for password crypt functions and collects common constants.
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.
Package apr1_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD, and modified by the Apache project.
crypt/common
Package common contains routines used by multiple password hashing algorithms.
Package common contains routines used by multiple password hashing algorithms.
crypt/md5_crypt
Package md5_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD.
Package md5_crypt implements the standard Unix MD5-crypt algorithm created by Poul-Henning Kamp for FreeBSD.
crypt/sha256_crypt
Package sha256_crypt implements Ulrich Drepper's SHA256-crypt password hashing algorithm.
Package sha256_crypt implements Ulrich Drepper's SHA256-crypt password hashing algorithm.
crypt/sha512_crypt
Package sha512_crypt implements Ulrich Drepper's SHA512-crypt password hashing algorithm.
Package sha512_crypt implements Ulrich Drepper's SHA512-crypt password hashing algorithm.

Jump to

Keyboard shortcuts

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