/consterr

A better way to implement constant errors in Go

Primary LanguageGoApache License 2.0Apache-2.0

consterr GoDocBuild StatusCoverage Status

A better way to implement constant errors in Go

Usage

Simply import the package and use consterr.Error as the type for your constants, assigning a string value. For example:

import "github.com/panux/consterr"
const (
	example consterr.Error = "Example error"
)