sentinel

package module
v0.0.0-...-7ba6fb3 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2022 License: MIT Imports: 0 Imported by: 0

README

Sentinel

Simple package for creating sentinel errors in Golang

Usage:

package mypackage

const ErrorSomethingWentWrong = sentinel.Error("something went wrong")

func myFunc() error {
	// ...
	
	if somethingWentWrong {
		return ErrorSomethingWentWrong
	}
	
	// ...
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

func (Error) Error

func (err Error) Error() string

Jump to

Keyboard shortcuts

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