base

package
v0.0.0-...-353851b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Response

func Response(w http.ResponseWriter, resp interface{}, err error)

Types

type Body

type Body struct {
	Code int         `json:"code"` //响应码
	Msg  string      `json:"msg"`  //错误提示
	Data interface{} `json:"data"` //返回结果
}

type Error

type Error struct {
	Code int    `json:"code"`
	Msg  string `json:"msg"`
}

func (Error) Error

func (err Error) Error() string

Jump to

Keyboard shortcuts

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