util

package
v1.4.1-0...-0702f9d Latest Latest
Warning

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

Go to latest
Published: May 5, 2021 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const NewLine = "\n"

Variables

This section is empty.

Functions

func Cors

func Cors() gin.HandlerFunc

Types

type Result

type Result struct {
	Ctx *gin.Context
}

func NewResult

func NewResult(ctx *gin.Context) *Result

func (*Result) Error

func (r *Result) Error(code int, msg string)

func (*Result) Success

func (r *Result) Success(data interface{})

type ResultCont

type ResultCont 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