resp

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2022 License: Apache-2.0 Imports: 4 Imported by: 18

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resp

type Resp struct {
	e.Error

	Data interface{} `json:"data"`
}

Resp unified encapsulation of business return values.

func Format

func Format(data interface{}, err error) (r *Resp)

Format formatting return value

func (*Resp) Context

func (r *Resp) Context(c context, code ...int)

Context write http status

Jump to

Keyboard shortcuts

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