lib

package
v0.0.0-...-f7f2675 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2023 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package lib grouping various libraries

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WaitStatus

func WaitStatus() int

WaitStatus waits for a signal or an error and returns an integer value. It registers the SIGINT and SIGTERM signals using the signal.Notify method, then waits for either a signal or an error using a select statement. If a signal is received, it sends a value of 0 to the "done" channel. If an error is received, it prints the error and sends a value of 1 to the "done" channel. Finally, it waits for a value to be received from the "done" channel and returns it as the result of the function.

func WithCriticalError

func WithCriticalError(criticalError error)

WithCriticalError quit the program following when a critical error occurs

Types

This section is empty.

Jump to

Keyboard shortcuts

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