errors

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: May 7, 2019 License: BSD-3-Clause Imports: 1 Imported by: 4

Documentation

Overview

Package errors provide an error type with code.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type E

type E struct {
	Code    int
	Message string
}

E define custom error type with code.

func Internal

func Internal() *E

Internal define an error for internal server.

func InvalidInput

func InvalidInput(field string) *E

InvalidInput generate an error for invalid input.

func (*E) Error

func (e *E) Error() string

Error implement the error interface.

Jump to

Keyboard shortcuts

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