util

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DateConversion

func DateConversion(data string) (string, error)

DateConversion takes a string date and converts it to a standardized format. It accepts a string parameter 'data' containing a date. Returns the converted date string and an error if the conversion fails.

func GetHostname

func GetHostname() (string, error)

GetHostname reads the contents of /etc/hostname file

func GetMachineId

func GetMachineId() (string, error)

GetMachineId reads the contents of /etc/machine-id file

func PackageBinary

func PackageBinary() string

PackageBinary determines the package manager (dnf or yum) to use

func SplitPackageName

func SplitPackageName(package_name string) (name, version, release, epoch, arch string)

SplitPackageName splits the given package name into its components.

Types

This section is empty.

Jump to

Keyboard shortcuts

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