Categorygithub.com/jefferyjob/go-easy-utils/v2

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

go-easy-utils

Go Release Action Report Coverage Doc License

English | 简体中文

介绍

这是一个基于 Go 语言开发的通用数据类型处理工具类,帮助开发者在业务代码实现中处理常见的数据类型和数据操作。可以让您专注于您的业务代码的实现,而免去处理基本数据类型转换和验证的功能。该工具库无侵入式的设计可以让您的业务代码更容易阅读和优雅。

快速开始

安装

使用 Go1.18 及以上版本的用户,建议安装 v2.x.x。 因为 v2.x.x 应用 Go1.18 的泛型重写了大部分函数。

go get -u github.com/jefferyjob/go-easy-utils/v2

使用 Go1.18 以下版本的用户,请使用 v1.x 版本

使用Demo

package main

import (
	"fmt"
	"github.com/jefferyjob/go-easy-utils/v2/sliceUtil"
)

func main() {
	var slice = []string{"this", "is", "go", "easy", "utils"}
	chunkSlice := sliceUtil.ChunkSlice(slice, 2)
	fmt.Printf("%v", chunkSlice)
}

功能列表

包名函数概要文档
anyUtil将任意类型的数据转换为指定类型README
byteUtil字节数组转换README
cryptoUtil各种加密处理README
emojiUtil表情符号的解码和编码README
floatUtil浮点数数据处理README
intUtil数值数据处理README
jsonUtilJSON 数据转换,支持弱类型转换README
mapUtilMap 类型数据处理README
mathUtil数学函数可以处理整数和浮点数范围内的值README
randUtil随机数生成,包括:数字、字符串、字节数组README
sliceUtil切片处理(分组、求和、转换、合并等)README
strUtil字符串转换处理README
validUtil常见数据验证,如:中文、英文、姓名、身份证号、电话号码、电子邮件README

许可证

本库采用 Apache-2.0 进行授权。有关详细信息,请参阅 LICENSE 文件。