Skip to content
This repository was archived by the owner on Nov 20, 2019. It is now read-only.

Latest commit

 

History

History
11 lines (10 loc) · 659 Bytes

File metadata and controls

11 lines (10 loc) · 659 Bytes

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"
)