errr

package module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: MIT Imports: 1 Imported by: 0

README

errr

A very simple go package that handles errors. There is nothing crazy going on here, just moved some code I write a million times into a separate package.

usage

instead of writing this 400 times

if err != nil {
  log.Fatal(err.Error())
}

you can now do this

package main

import "github.com/ty-e-boyd/errr"

func main() {
  d, err := MightReturnError()
  errr.Fatal(err)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Fatal

func Fatal(error error)

Fatal takes in the potential error, and handles the error with a fatal if it exists.

func Warn

func Warn(error error)

Warn takes in the potential error, and handles the error with a warn if it exists.

Types

This section is empty.

Jump to

Keyboard shortcuts

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