consterror

package
v0.30.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Error

type Error string

Error is an implementation for the error interface that allow you to declare exported globals with the `const` keyword.

TL;DR:
	const ErrSomething errs.Error = "something is an error"

func (Error) Error

func (err Error) Error() string

Error implement the error interface

Example
package main

import (
	"github.com/adamluzsi/frameless/consterror"
)

func main() {
	const ErrSomething consterror.Error = "something is an error"
}
Output:

Jump to

Keyboard shortcuts

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