apperrors

package
v0.0.0-...-177a8f4 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package apperrors handes application errors

Index

Constants

View Source
const (
	//ErrFileNotFound is when we cannot find the file
	ErrFileNotFound = "The File is not found"
)

DEFINES SOME COMMON ERRORS

View Source
const (
	//ErrFileNotFoundCode is code when we cannot find the file
	ErrFileNotFoundCode = "1021"
)

Variables

This section is empty.

Functions

func New

func New(message string, code string) error

New is a constructor that creates a new error

Types

type Error

type Error struct {
	Message string
	Date    time.Time
	Code    string
}

Error struct holds the error information

func (*Error) Error

func (e *Error) Error() string

implements the Error interface so we can return an error

Jump to

Keyboard shortcuts

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