util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ERROR      = -1
	SUCCESS    = 0
	ErrorMsg   = "操作失败"
	SuccessMsg = "操作成功"
)

Variables

This section is empty.

Functions

func FailWithMsg

func FailWithMsg(c *gin.Context, msg string)

func OK

func OK(c *gin.Context)

func OKWithData

func OKWithData(c *gin.Context, data interface{})

func WrapValidateErrMsg

func WrapValidateErrMsg(err error) (msg string)

Types

type Response

type Response struct {
	Code int         `json:"code"`
	Msg  string      `json:"msg"`
	Data interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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