go-tstr / tstr / strerr

github.com/go-tstr/tstr/strerr

pkg.go.dev source
go get github.com/go-tstr/tstr/strerr@v0.0.3

Overview

Package strerr provides string error type that allows decalring errors as constants unlike Go's own errors.New which uses privete struct type.

Types

type Error

type Error string

Error adds Error method to string type.

func (Error) Error

func (e Error) Error() string