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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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