Back to

Package tape

Latest Go to latest

The latest major version is .

Published: May 16, 2020 | License: MIT | Module:



const (
	// SUCCESS show status 200 when success
	SUCCESS = 200

	// FAIL show status 404 when fail
	FAIL = 404


var Exce = new(Exception)

Exce exce

type Exception

type Exception struct{}

Exception throw exception

func (*Exception) Catch

func (e *Exception) Catch(ctx echo.Context) func()

Catch throw exception if recover err

func (*Exception) Err

func (e *Exception) Err(err error, message interface{})

Err throw exception if err!=nil

func (*Exception) OK

func (e *Exception) OK(ok bool, message interface{})

OK throw exception if !ok

type Hash

type Hash struct {
	STATUS  int         `json:"status"`            // show sataus
	RESULT  interface{} `json:"result,omitempty"`  // show result when success
	MESSAGE interface{} `json:"message,omitempty"` // show message when fail

Hash map

type Map

type Map map[string]interface{}

Map map

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier