notify

package module
v0.0.0-...-3fd7574 Latest Latest
Warning

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

Go to latest
Published: May 23, 2024 License: MIT Imports: 4 Imported by: 43

README

Notify handler

Simpel and easy notify handler

Installation

Simply run github.com/DennisTheodoreNedry/notify_handler to add it to your project

Contents

The following table contains all tools available in this project.

Logging

Note: Must utilize the Constructor function for this to work

Function Description Note
SetLvl Sets the internal verbose level
Log Prints the provided message if the internal verbose level is higher then the lowest level needed
Informative
Function Description Note
Inform Basic print
Warning Spicy basic print
Error Prints a basic error message explaining what went wrong and where Exits the program after printing

Example

Check out the project under example/

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(msg string, where string, return_code int)

Prints the error message and exits

func Inform

func Inform(msg string)

Prints a message in green

func Warning

func Warning(msg string)

Prints a message in yellow

Types

type Verbose_t

type Verbose_t struct {
	// contains filtered or unexported fields
}

func Constructor

func Constructor(default_verbose_lvl string) Verbose_t

Constructor, creates and returns a verbose object

func (*Verbose_t) Log

func (handler *Verbose_t) Log(msg string, suggested_verbose_lvl int)

Prints a message depending if the configured verbose lvl is high enough

func (*Verbose_t) SetLvl

func (handler *Verbose_t) SetLvl(new_verbose_lvl string)

Sets the internal verbose level for this object Will call `object.Error` if the new verbose lvl is invalid

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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