utils

package
v0.0.0-...-6bb069b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Http = &httpUtil{}
)
View Source
var (
	Json = &Helper{}
)

Functions

func GetCorrelationId

func GetCorrelationId(fid int, batchId int) string

func ToInt

func ToInt(v interface{}) (int, error)

Types

type Helper

type Helper struct {
}

func (*Helper) ToArray

func (h *Helper) ToArray(text string) ([]interface{}, error)

func (*Helper) ToMap

func (h *Helper) ToMap(text string) (map[string]interface{}, error)

type ValidateUtil

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

func GetValidateUtil

func GetValidateUtil() *ValidateUtil

func (*ValidateUtil) IsChineseChar

func (validate *ValidateUtil) IsChineseChar(str string) bool

* 是否包含中文

func (*ValidateUtil) ValidateMap

func (validate *ValidateUtil) ValidateMap(jsonMap map[string]interface{}) bool

* 判断jsonMap是否符合模板样式

func (*ValidateUtil) ValidateString

func (validate *ValidateUtil) ValidateString(jsonString string) bool

* 判断jsonString是否符合模板样式

Jump to

Keyboard shortcuts

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