lib

package
v0.0.0-...-9d12082 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CustomContextMiddleware

func CustomContextMiddleware() echo.MiddlewareFunc

func Find

func Find(slice []string, val string) (int, bool)

Find is used to find(check) the index of a value in the slice

func Handle

func Handle(err error)

func JSON

func JSON(code int, message string) *echo.HTTPError

func LogErr

func LogErr(err error, message ...string)

func Logger

func Logger() echo.MiddlewareFunc

Logger is the middleware that use to log message to the stdout

func Recover

func Recover() echo.MiddlewareFunc

Recover is the middleware that used to recovery frm panic

func UniqueInts

func UniqueInts(intSlice []int) []int

func UniqueStrings

func UniqueStrings(stringSlice []string) []string

func UniqueUints

func UniqueUints(uintSlice []uint) []uint

Types

type CustomContext

type CustomContext struct {
	echo.Context
}

type Resp

type Resp struct {
	Message string `json:"message"`
}

Jump to

Keyboard shortcuts

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