goerror

package module
v0.0.0-...-f3f31b4 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2019 License: BSD-2-Clause Imports: 3 Imported by: 0

README

=======
GoError
=======

A go interface for easily handeling error calls.

Credit
------

This package uses ANSI Escape Codes from `github.com/fatih/color <https://github.com/fatih/color>`_
by `Fatih Arslan <https://github.com/fatih>`_.

Installation
------------

.. code:: go

   import (
      "github.com/TheSp1der/GoError"
      "errors"
   )

Usage
-----

Fatal Errors: This will stop the process.

.. code:: go

   GoError.Fatal(errors.New("This is a fatal error and will call os.Exit()"))

Warning Errors: Identify the error as a warning.

.. code:: go

   GoError.Warning(errors.New("This is a warning"))

Informational Errors:

.. code:: go

   GoError.Info(errors.New("This is non-critical information"))


Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(err error)

Fatal reports error on stdout and halts the program

func FatalReceiver

func FatalReceiver(err <-chan error)

FatalReceiver reports error on stdout and halts the program via a blocking channel

func Info

func Info(err error)

Info reports info on stdout via a blocking channel

func InfoReceiver

func InfoReceiver(err <-chan error)

InfoReceiver reports info on stdout via a blocking channel

func Warning

func Warning(err error)

Warning reports warning on stdout

func WarningReceiver

func WarningReceiver(err <-chan error)

WarningReceiver reports warning on stdout via a blocking channel

Types

This section is empty.

Jump to

Keyboard shortcuts

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