utils

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 日期格式字符串
	DateFormat = "2006-01-02"

	// 时间格式字符串
	TimeFormat = "2006-01-02 15:04:05"
)

全局常量定义

Variables

This section is empty.

Functions

func Compare

func Compare(first, second string) (bool, error)

Compare 比较两个数字字符串的大小

func CreatFilePath

func CreatFilePath(path string) error

CreatFilePath 创建文件路径

func HmacSha1

func HmacSha1(data, secrect string) string

HmacSha1 HmacSha1加密

func HmacSha256

func HmacSha256(data, secret []byte) []byte

HmacSha256加密

func IsBasicType

func IsBasicType(kind reflect.Kind) bool

IsBasicType 判断参数类型是否为基础类型

func IsFilePathExist

func IsFilePathExist(path string) bool

IsFilePathExist 判断某个文件路径是否存在

func IsMap

func IsMap(value interface{}) bool

IsMap 判断是否为map

func IsSlice

func IsSlice(value interface{}) bool

IsSlice 判断参数是否为slice

func IsSlicePointer

func IsSlicePointer(value interface{}) bool

IsSlicePointer 判断是否为切片指针

func IsStructPointer

func IsStructPointer(value interface{}) bool

IsStructPointer 判断是否为结构体指针

func MD5WithBase64

func MD5WithBase64(data []byte) string

MD5WithBase64 先使用MD5加密 然后使用base64加密

func MergeErrors

func MergeErrors(errorLisst []error) error

MergeErrors 合并错误列表为一个错误,使用换行符连接报错信息

func Sha256hash

func Sha256hash(data []byte) string

Sha256hash sha256哈希编码

Types

This section is empty.

Jump to

Keyboard shortcuts

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