cerr

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2019 License: MIT Imports: 0 Imported by: 0

README

cerr

Short for constant error, cerr provides errors which can be compared in logic statements. For example:

foo, err := getFoo()
if err != nil {
  if err == SpecialErr {
    // do something...
    return
  }

  // do something else
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

Error implements the error interface

func (Error) Error

func (e Error) Error() string

Error returns a string

Jump to

Keyboard shortcuts

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