utils

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatBytes

func FormatBytes(bytes uint64) string

FormatBytes 格式化字节大小为易读形式

func HandleValidationErrors

func HandleValidationErrors(err error, c *flow.Context)

HandleValidationErrors 处理验证错误

Types

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

Validator 是验证器结构体

func NewValidator

func NewValidator() *Validator

NewValidator 创建一个新的验证器

func (*Validator) Validate

func (v *Validator) Validate(obj interface{}) error

Validate 验证对象

Jump to

Keyboard shortcuts

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