bind

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBindErr

func FormatBindErr(errs ValidErrors) string

Types

type ValidError

type ValidError struct {
	Key     string
	Message string
}

func (*ValidError) Error

func (v *ValidError) Error() string

type ValidErrors

type ValidErrors []*ValidError

func BindAndValid

func BindAndValid(c *gin.Context, v interface{}) (ok bool, errs ValidErrors)

BindAndValid 参数绑定并翻译错误

func (*ValidErrors) Error

func (v *ValidErrors) Error() string

func (ValidErrors) Errors

func (v ValidErrors) Errors() (ret []string)

Jump to

Keyboard shortcuts

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