mirror of
https://github.com/duke-git/lancet.git
synced 2026-02-23 13:52:26 +08:00
doc: update readme file for new feature
This commit is contained in:
16
README.md
16
README.md
@@ -709,7 +709,14 @@ import "github.com/duke-git/lancet/v2/mathutil"
|
|||||||
- **<big>RangeWithStep</big>** : Creates a slice of numbers from start to end with specified step.
|
- **<big>RangeWithStep</big>** : Creates a slice of numbers from start to end with specified step.
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#Range)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#Range)]
|
||||||
[[play](https://go.dev/play/p/akLWz0EqOSM)]
|
[[play](https://go.dev/play/p/akLWz0EqOSM)]
|
||||||
|
- **<big>AngleToRadian</big>** : converts angle value to radian value.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#AngleToRadian)]
|
||||||
|
- **<big>RadianToAngle</big>** : converts radian value to angle value.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#RadianToAngle)]
|
||||||
|
- **<big>PointDistance</big>** : get two points distance.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#PointDistance)]
|
||||||
|
- **<big>IsPrime</big>** : checks if number is prime number.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#IsPrime)]
|
||||||
|
|
||||||
### 13. Netutil package contains functions to get net information and send http request.
|
### 13. Netutil package contains functions to get net information and send http request.
|
||||||
|
|
||||||
@@ -1032,7 +1039,6 @@ import "github.com/duke-git/lancet/v2/slice"
|
|||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/slice.md#KeyBy)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/slice.md#KeyBy)]
|
||||||
[[play](https://go.dev/play/p/uXod2LWD1Kg)]
|
[[play](https://go.dev/play/p/uXod2LWD1Kg)]
|
||||||
|
|
||||||
|
|
||||||
### 17. Structs package provides several high level functions to manipulate struct, tag, and field.
|
### 17. Structs package provides several high level functions to manipulate struct, tag, and field.
|
||||||
|
|
||||||
```go
|
```go
|
||||||
@@ -1142,6 +1148,8 @@ import "github.com/duke-git/lancet/v2/strutil"
|
|||||||
- **<big>WordCount</big>** : return the number of meaningful word of a string, word only contains alphabetic characters.
|
- **<big>WordCount</big>** : return the number of meaningful word of a string, word only contains alphabetic characters.
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#WordCount)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#WordCount)]
|
||||||
[[play](https://go.dev/play/p/bj7_odx3vRf)]
|
[[play](https://go.dev/play/p/bj7_odx3vRf)]
|
||||||
|
- **<big>RemoveNonPrintable</big>** : remove non-printable characters from a string.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#RemoveNonPrintable)]
|
||||||
|
|
||||||
### 19. System package contain some functions about os, runtime, shell command.
|
### 19. System package contain some functions about os, runtime, shell command.
|
||||||
|
|
||||||
@@ -1271,6 +1279,10 @@ import "github.com/duke-git/lancet/v2/validator"
|
|||||||
- **<big>IsGBK</big>** : check if data encoding is gbk.
|
- **<big>IsGBK</big>** : check if data encoding is gbk.
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator.md#IsGBK)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator.md#IsGBK)]
|
||||||
[[play](https://go.dev/play/p/E2nt3unlmzP)]
|
[[play](https://go.dev/play/p/E2nt3unlmzP)]
|
||||||
|
- **<big>IsASCII</big>** : checks if string is all ASCII char.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator.md#IsASCII)]
|
||||||
|
- **<big>IsPrintable</big>** : checks if string is all printable chars.
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator.md#IsPrintable)]
|
||||||
|
|
||||||
### 21. xerror package implements helpers for errors.
|
### 21. xerror package implements helpers for errors.
|
||||||
|
|
||||||
|
|||||||
@@ -708,7 +708,14 @@ import "github.com/duke-git/lancet/v2/mathutil"
|
|||||||
- **<big>RangeWithStep</big>** : 根据指定的起始值,结束值,步长,创建一个数字切片。
|
- **<big>RangeWithStep</big>** : 根据指定的起始值,结束值,步长,创建一个数字切片。
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#RangeWithStep)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#RangeWithStep)]
|
||||||
[[play](https://go.dev/play/p/akLWz0EqOSM)]
|
[[play](https://go.dev/play/p/akLWz0EqOSM)]
|
||||||
|
- **<big>AngleToRadian</big>** : 将角度值转为弧度值。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#AngleToRadian)]
|
||||||
|
- **<big>RadianToAngle</big>** : 将弧度值转为角度值。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#RadianToAngle)]
|
||||||
|
- **<big>PointDistance</big>** : 计算两个坐标点的距离。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#PointDistance)]
|
||||||
|
- **<big>IsPrime</big>** : 判断质数。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#IsPrime)]
|
||||||
|
|
||||||
### 13. netutil 网络包支持获取 ip 地址,发送 http 请求。
|
### 13. netutil 网络包支持获取 ip 地址,发送 http 请求。
|
||||||
|
|
||||||
@@ -1143,7 +1150,8 @@ import "github.com/duke-git/lancet/v2/strutil"
|
|||||||
- **<big>WordCount</big>** : 返回有意义单词的数量,只支持字母字符单词。
|
- **<big>WordCount</big>** : 返回有意义单词的数量,只支持字母字符单词。
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#WordCount)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#WordCount)]
|
||||||
[[play](https://go.dev/play/p/bj7_odx3vRf)]
|
[[play](https://go.dev/play/p/bj7_odx3vRf)]
|
||||||
|
- **<big>RemoveNonPrintable</big>** : 删除字符串中不可打印的字符。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#RemoveNonPrintable)]
|
||||||
|
|
||||||
### 19. system 包含 os, runtime, shell command 的相关函数。
|
### 19. system 包含 os, runtime, shell command 的相关函数。
|
||||||
|
|
||||||
@@ -1273,6 +1281,10 @@ import "github.com/duke-git/lancet/v2/validator"
|
|||||||
- **<big>IsGBK</big>** : 检查数据编码是否为 gbk(汉字内部代码扩展规范)。
|
- **<big>IsGBK</big>** : 检查数据编码是否为 gbk(汉字内部代码扩展规范)。
|
||||||
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator_zh-CN.md#IsGBK)]
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator_zh-CN.md#IsGBK)]
|
||||||
[[play](https://go.dev/play/p/E2nt3unlmzP)]
|
[[play](https://go.dev/play/p/E2nt3unlmzP)]
|
||||||
|
- **<big>IsASCII</big>** : 验证字符串全部为 ASCII 字符。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator_zh-CN.md#IsASCII)]
|
||||||
|
- **<big>IsPrintable</big>** : 检查字符串是否全部为可打印字符。
|
||||||
|
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator_zh-CN.md#IsPrintable)]
|
||||||
|
|
||||||
### 21. xerror 包实现一些错误处理函数
|
### 21. xerror 包实现一些错误处理函数
|
||||||
|
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ import (
|
|||||||
- [AngleToRadian](#AngleToRadian)
|
- [AngleToRadian](#AngleToRadian)
|
||||||
- [RadianToAngle](#RadianToAngle)
|
- [RadianToAngle](#RadianToAngle)
|
||||||
- [PointDistance](#PointDistance)
|
- [PointDistance](#PointDistance)
|
||||||
|
- [IsPrime](#IsPrime)
|
||||||
|
|
||||||
<div STYLE="page-break-after: always;"></div>
|
<div STYLE="page-break-after: always;"></div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user