1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: update link in readme

This commit is contained in:
dudaodong
2023-07-03 11:57:50 +08:00
parent 06a558d797
commit 1b754a6264
2 changed files with 58 additions and 62 deletions

View File

@@ -86,7 +86,6 @@ func main() {
- [Fileutil](#Fileutil)
- [Formatter](#Formatter)
- [Function](#Function)
- [Iterator](#Iterator)
- [Maputil](#Maputil)
- [Mathutil](#Mathutil)
- [Netutil](#Netutil)
@@ -102,9 +101,7 @@ func main() {
- [Validator](#Validator)
- [Xerror](#Xerror)
<h3 id="Algorithm"> 1. Algorithm package implements some basic algorithm. eg. sort, search. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index) </h3>
#### Usage:
<h3 id="Algorithm"> 1. Algorithm package implements some basic algorithm. eg. sort, search. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span> </h3>
```go
import "github.com/duke-git/lancet/v2/algorithm"
@@ -149,7 +146,7 @@ import "github.com/duke-git/lancet/v2/algorithm"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/algorithm.md#LRUCache)]
[[play](https://go.dev/play/p/-EZjgOURufP)]
### <span id="Compare"> 2. Compare package provides a lightweight comparison function on any type.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Compare"> 2. Compare package provides a lightweight comparison function on any type. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span> </h3>
```go
import "github.com/duke-git/lancet/v2/compare"
@@ -176,7 +173,7 @@ import "github.com/duke-git/lancet/v2/compare"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/compare.md#GreaterOrEqual)]
[[play](https://go.dev/play/p/vx8mP0U8DFk)]
### <span id="Concurrency">3. Concurrency package contain some functions to support concurrent programming. eg, goroutine, channel, async.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Concurrency"> 3. Concurrency package contain some functions to support concurrent programming. eg, goroutine, channel, async. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span> </h3>
```go
import "github.com/duke-git/lancet/v2/concurrency"
@@ -215,7 +212,7 @@ import "github.com/duke-git/lancet/v2/concurrency"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Tee)]
[[play](https://go.dev/play/p/3TQPKnCirrP)]
### <span id="Condition">4. Condition package contains some functions for conditional judgment. eg. And, Or, TernaryOperator...</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Condition"> 4. Condition package contains some functions for conditional judgment. eg. And, Or, TernaryOperator...&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span> </h3>
```go
import "github.com/duke-git/lancet/v2/condition"
@@ -248,7 +245,7 @@ import "github.com/duke-git/lancet/v2/condition"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/condition.md#TernaryOperator)]
[[play](https://go.dev/play/p/ElllPZY0guT)]
### <span id="Convertor">5. Convertor package contains some functions for data convertion.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Convertor"> 5. Convertor package contains some functions for data convertion. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span> </h3>
```go
import "github.com/duke-git/lancet/v2/convertor"
@@ -320,7 +317,7 @@ import "github.com/duke-git/lancet/v2/convertor"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/convertor.md#GbkToUtf8)]
[[play](https://go.dev/play/p/OphmHCN_9u8)]
### <span id="Cryptor">6. Cryptor package is for data encryption and decryption.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Cryptor"> 6. Cryptor package is for data encryption and decryption.</span> &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/cryptor"
@@ -424,7 +421,7 @@ import "github.com/duke-git/lancet/v2/cryptor"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/cryptor.md#RsaDecrypt)]
[[play](https://go.dev/play/p/uef0q1fz53I)]
### <span id="Datetime">7. Datetime package supports date and time format and compare.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Datetime"> 7. Datetime package supports date and time format and compare. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/datetime"
@@ -538,7 +535,7 @@ import "github.com/duke-git/lancet/v2/datetime"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/datetime.md#IsWeekend)]
[[play](https://go.dev/play/p/cupRM5aZOIY)]
### <span id="Datastructure">8. Datastructure package constains some common data structure. eg. list, linklist, stack, queue, set, tree, graph.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Datastructure"> 8. Datastructure package constains some common data structure. eg. list, linklist, stack, queue, set, tree, graph. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import list "github.com/duke-git/lancet/v2/datastructure/list"
@@ -570,7 +567,7 @@ import hashmap "github.com/duke-git/lancet/v2/datastructure/hashmap"
- **<big>Hashmap</big>** : hash map structure.
[[doc](https://github.com/duke-git/lancet/blob/main/docs/datastructure/hashmap.md)]
### <span id="Fileutil">9. Fileutil package implements some basic functions for file operations.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Fileutil"> 9. Fileutil package implements some basic functions for file operations. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/fileutil"
@@ -653,7 +650,7 @@ import "github.com/duke-git/lancet/v2/fileutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/fileutil.md#WriteStringToFile)]
[[play](https://go.dev/play/p/GhLS6d8lH_g)]
### <span id="Formatter">10. Formatter contains some functions for data formatting.</span> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Formatter"> 10. Formatter contains some functions for data formatting. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/formatter"
@@ -683,7 +680,7 @@ import "github.com/duke-git/lancet/v2/formatter"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/formatter.md#ParseBinaryBytes)]
[[play](https://go.dev/play/p/69v1tTT62x8)]
### <span id="Function">11. Function package can control the flow of function execution and support part of functional programming.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Function"> 11. Function package can control the flow of function execution and support part of functional programming.&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/function"
@@ -719,7 +716,7 @@ import "github.com/duke-git/lancet/v2/function"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/function.md#Watcher)]
[[play](https://go.dev/play/p/l2yrOpCLd1I)]
### <span id="Maputil">12. Maputil package includes some functions to manipulate map.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Maputil"> 12. Maputil package includes some functions to manipulate map.&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/maputil"
@@ -791,7 +788,7 @@ import "github.com/duke-git/lancet/v2/maputil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/maputil.md#IsDisjoint)]
[[play](https://go.dev/play/p/N9qgYg_Ho6f)]
### <span id="Mathutil">13. Mathutil package implements some functions for math calculation.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Mathutil"> 13. Mathutil package implements some functions for math calculation. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</span></h3>
```go
import "github.com/duke-git/lancet/v2/mathutil"
@@ -872,7 +869,7 @@ import "github.com/duke-git/lancet/v2/mathutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil.md#Sum)]
[[play](https://go.dev/play/p/1To2ImAMJA7)]
### <span id="Netutil">14. Netutil package contains functions to get net information and send http request.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Netutil"> 14. Netutil package contains functions to get net information and send http request. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/netutil"
@@ -945,7 +942,7 @@ import "github.com/duke-git/lancet/v2/netutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/netutil.md#IsTelnetConnected)]
[[play](https://go.dev/play/p/yiLCGtQv_ZG)]
### <span id="Pointer">15. Pointer package contains some util functions to operate go pointer.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Pointer"> 15. Pointer package contains some util functions to operate go pointer. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/pointer"
@@ -963,7 +960,7 @@ import "github.com/duke-git/lancet/v2/pointer"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/pointer.md#Unwrap)]
[[play](https://go.dev/play/p/cgeu3g7cjWb)]
### <span id="Random">16. Random package implements some basic functions to generate random int and string.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Random"> 16. Random package implements some basic functions to generate random int and string. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/random"
@@ -999,7 +996,7 @@ import "github.com/duke-git/lancet/v2/random"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/random.md#RandUniqueIntSlice)]
[[play](https://go.dev/play/p/uBkRSOz73Ec)]
### <span id="Retry">17. Retry package is for executing a function repeatedly until it was successful or canceled by the context.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Retry"> 17. Retry package is for executing a function repeatedly until it was successful or canceled by the context. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/retry"
@@ -1023,7 +1020,7 @@ import "github.com/duke-git/lancet/v2/retry"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/retry.md#RetryTimes)]
[[play](https://go.dev/play/p/ssfVeU2SwLO)]
### <span id="Slice">18. Slice contains some functions to manipulate slice.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Slice"> 18. Slice contains some functions to manipulate slice. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/slice"
@@ -1236,7 +1233,7 @@ import "github.com/duke-git/lancet/v2/slice"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/slice.md#KeyBy)]
[[play](https://go.dev/play/p/uXod2LWD1Kg)]
### <span id="Stream">19. Stream package implements a sequence of elements supporting sequential and operations. this package is an experiment to explore if stream in go can work as the way java does. its function is very limited.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Stream"> 19. Stream package implements a sequence of elements supporting sequential and operations. this package is an experiment to explore if stream in go can work as the way java does. its function is very limited. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/stream"
@@ -1323,7 +1320,7 @@ import "github.com/duke-git/lancet/v2/stream"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/stream.md#ToSlice)]
[[play](https://go.dev/play/p/jI6_iZZuVFE)]
### <span id="Structs">20. Structs package provides several high level functions to manipulate struct, tag, and field.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Structs"> 20. Structs package provides several high level functions to manipulate struct, tag, and field. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/structs"
@@ -1356,7 +1353,7 @@ import "github.com/duke-git/lancet/v2/structs"
- **<big>IsSlice</big>** : check if the field is a slice
[[doc](https://github.com/duke-git/lancet/blob/main/docs/structs/field.md#IsSlice)]
### <span id="Strutil">21. Strutil package contains some functions to manipulate string.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Strutil"> 21. Strutil package contains some functions to manipulate string. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/strutil"
@@ -1474,7 +1471,7 @@ import "github.com/duke-git/lancet/v2/strutil"
- **<big>RemoveWhiteSpace</big>** : remove whitespace characters from a string.
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil.md#RemoveWhiteSpace)]
### <span id="System">22. System package contain some functions about os, runtime, shell command.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="System"> 22. System package contain some functions about os, runtime, shell command. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/system"
@@ -1510,7 +1507,7 @@ import "github.com/duke-git/lancet/v2/system"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/system.md#GetOsBits)]
[[play](https://go.dev/play/p/ml-_XH3gJbW)]
### <span id="Tuple">23. Tuple package implements tuple data type and some operations on it.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Tuple"> 23. Tuple package implements tuple data type and some operations on it. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/tuple"
@@ -1591,7 +1588,7 @@ import "github.com/duke-git/lancet/v2/tuple"
- **<big>Unzip10</big>** : create a group of slice from a slice of Tuple10.
[[doc](https://github.com/duke-git/lancet/blob/main/docs/tuple.md#Unzip10)]
### <span id="Validator">24. Validator package contains some functions for data validation.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Validator"> 24. Validator package contains some functions for data validation. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/validator"
@@ -1699,7 +1696,7 @@ import "github.com/duke-git/lancet/v2/validator"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator.md#IsPrintable)]
[[play](https://go.dev/play/p/Pe1FE2gdtTP)]
### <span id="Xerror">25. xerror package implements helpers for errors.</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; [index](#index)
<h3 id="Xerror"> 25. Xerror package implements helpers for errors. &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">index</a></h3>
```go
import "github.com/duke-git/lancet/v2/xerror"

View File

@@ -85,7 +85,6 @@ func main() {
- [Fileutil](#Fileutil)
- [Formatter](#Formatter)
- [Function](#Function)
- [Iterator](#Iterator)
- [Maputil](#Maputil)
- [Mathutil](#Mathutil)
- [Netutil](#Netutil)
@@ -101,13 +100,13 @@ func main() {
- [Validator](#Validator)
- [Xerror](#Xerror)
### <span id="Algorithm">1. algorithm 包实现一些基本查找和排序算法。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Algorithm"> 1. algorithm 包实现一些基本查找和排序算法。 &nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/algorithm"
```
#### Function list:
#### 函数列表:
- **<big>BubbleSort</big>** : 使用冒泡排序算法对切片进行排序。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/algorithm_zh-CN.md#BubbleSort)]
@@ -146,13 +145,13 @@ import "github.com/duke-git/lancet/v2/algorithm"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/algorithm_zh-CN.md#LRUCache)]
[[play](https://go.dev/play/p/-EZjgOURufP)]
### <span id="Compare">2. compare 包提供几个轻量级的类型比较函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Compare"> 2. compare 包提供几个轻量级的类型比较函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/compare"
```
#### Function list:
#### 函数列表:
- **<big>Equal</big>** : 检查两个值是否相等(检查类型和值)。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/compare_zh-CN.md#Equal)]
@@ -173,13 +172,13 @@ import "github.com/duke-git/lancet/v2/compare"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/compare_zh-CN.md#GreaterOrEqual)]
[[play](https://go.dev/play/p/vx8mP0U8DFk)]
### <span id="Concurrency">3. concurrency 包含一些支持并发编程的功能。例如goroutine, channel, async 等。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Concurrency"> 3. concurrency 包含一些支持并发编程的功能。例如goroutine, channel, async 等。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/concurrency"
```
#### Function list:
#### 函数列表:
- **<big>NewChannel</big>** : 返回一个 Channel 指针实例。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#NewChannel)]
@@ -212,13 +211,13 @@ import "github.com/duke-git/lancet/v2/concurrency"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Tee)]
[[play](https://go.dev/play/p/3TQPKnCirrP)]
### <span id="Condition">4. condition 包含一些用于条件判断的函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Condition"> 4. condition 包含一些用于条件判断的函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/condition"
```
#### Function list:
#### 函数列表:
- **<big>Bool</big>** : 返回传入参数的 bool 值。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/condition_zh-CN.md#Bool)]
@@ -245,7 +244,7 @@ import "github.com/duke-git/lancet/v2/condition"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/condition_zh-CN.md#TernaryOperator)]
[[play](https://go.dev/play/p/ElllPZY0guT)]
### <span id="Convertor">5. convertor 转换器包支持一些常见的数据类型转换。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Convertor"> 5. convertor 转换器包支持一些常见的数据类型转换。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/convertor"
@@ -317,7 +316,7 @@ import "github.com/duke-git/lancet/v2/convertor"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/convertor_zh-CN.md#GbkToUtf8)]
[[play](https://go.dev/play/p/OphmHCN_9u8)]
### <span id="Cryptor">6. cryptor 加密包支持数据加密和解密,获取 md5hash 值。支持 base64, md5, hmac, aes, des, rsa。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Cryptor"> 6. cryptor 加密包支持数据加密和解密,获取 md5hash 值。支持 base64, md5, hmac, aes, des, rsa。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/cryptor"
@@ -421,7 +420,7 @@ import "github.com/duke-git/lancet/v2/cryptor"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/cryptor_zh-CN.md#RsaDecrypt)]
[[play](https://go.dev/play/p/uef0q1fz53I)]
### <span id="Datetime">7. datetime 日期时间处理包,格式化日期,比较日期。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Datetime"> 7. datetime 日期时间处理包,格式化日期,比较日期。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/datetime"
@@ -538,7 +537,7 @@ import "github.com/duke-git/lancet/v2/datetime"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/datetime_zh-CN.md#IsWeekend)]
[[play](https://go.dev/play/p/cupRM5aZOIY)]
### <span id="Datastructure">8. datastructure 包含一些普通的数据结构实现。例如list, linklist, stack, queue, set, tree, graph.</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Datastructure"> 8. datastructure 包含一些普通的数据结构实现。例如list, linklist, stack, queue, set, tree, graph&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import list "github.com/duke-git/lancet/v2/datastructure/list"
@@ -551,7 +550,7 @@ import heap "github.com/duke-git/lancet/v2/datastructure/heap"
import hashmap "github.com/duke-git/lancet/v2/datastructure/hashmap"
```
#### Function list:
#### 函数列表:
- **<big>List</big>** : 线性表结构, 用切片实现。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/datastructure/list_zh-CN.md)]
@@ -570,7 +569,7 @@ import hashmap "github.com/duke-git/lancet/v2/datastructure/hashmap"
- **<big>Hashmap</big>** : 哈希映射。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/datastructure/hashmap_zh-CN.md)]
### <span id="Fileutil">9. fileutil 包含文件基本操作。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Fileutil"> 9. fileutil 包含文件基本操作。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/fileutil"
@@ -653,7 +652,7 @@ import "github.com/duke-git/lancet/v2/fileutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/fileutil_zh-CN.md#WriteStringToFile)]
[[play](https://go.dev/play/p/GhLS6d8lH_g)]
### <span id="Formatter">10. formatter 格式化器包含一些数据格式化处理方法。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Formatter"> 10. formatter 格式化器包含一些数据格式化处理方法。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/formatter"
@@ -683,7 +682,7 @@ import "github.com/duke-git/lancet/v2/formatter"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/formatter_zh-CN.md#ParseBinaryBytes)]
[[play](https://go.dev/play/p/69v1tTT62x8)]
### <span id="Function">11. function 函数包控制函数执行流程,包含部分函数式编程。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Function"> 11. function 函数包控制函数执行流程,包含部分函数式编程。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/function"
@@ -719,7 +718,7 @@ import "github.com/duke-git/lancet/v2/function"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/function_zh-CN.md#Watcher)]
[[play](https://go.dev/play/p/l2yrOpCLd1I)]
### <span id="Maputil">12. maputil 包括一些操作 map 的函数.</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Maputil"> 12. maputil 包括一些操作 map 的函数&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/maputil"
@@ -791,13 +790,13 @@ import "github.com/duke-git/lancet/v2/maputil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/maputil_zh-CN.md#IsDisjoint)]
[[play](https://go.dev/play/p/N9qgYg_Ho6f)]
### <span id="Mathutil">13. mathutil 包实现了一些数学计算的函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Mathutil"> 13. mathutil 包实现了一些数学计算的函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/mathutil"
```
#### Function list:
#### 函数列表:
- **<big>Average</big>** :计算平均数,可能需要对结果调用 RoundToFloat 方法四舍五入。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#Average)]
@@ -872,7 +871,7 @@ import "github.com/duke-git/lancet/v2/mathutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/mathutil_zh-CN.md#Sum)]
[[play](https://go.dev/play/p/1To2ImAMJA7)]
### <span id="Netutil">14. netutil 网络包支持获取 ip 地址,发送 http 请求。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Netutil"> 14. netutil 网络包支持获取 ip 地址,发送 http 请求。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/netutil"
@@ -945,7 +944,7 @@ import "github.com/duke-git/lancet/v2/netutil"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/netutil_zh-CN.md#IsTelnetConnected)]
[[play](https://go.dev/play/p/yiLCGtQv_ZG)]
### <span id="Pointer">15. pointer 包支持一些指针类型的操作。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Pointer"> 15. pointer 包支持一些指针类型的操作。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/pointer"
@@ -963,7 +962,7 @@ import "github.com/duke-git/lancet/v2/pointer"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/pointer_zh-CN.md#Unwrap)]
[[play](https://go.dev/play/p/cgeu3g7cjWb)]
### <span id="Random">16. random 随机数生成器包,可以生成随机[]bytes, int, string。
<h3 id="Random"> 16. random 随机数生成器包,可以生成随机[]bytes, int, string。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/random"
@@ -999,7 +998,7 @@ import "github.com/duke-git/lancet/v2/random"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/random_zh-CN.md#RandUniqueIntSlice)]
[[play](https://go.dev/play/p/uBkRSOz73Ec)]
### <span id="Retry">17. retry 重试执行函数直到函数运行成功或被 context cancel。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Retry"> 17. retry 重试执行函数直到函数运行成功或被 context cancel。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/retry"
@@ -1023,7 +1022,7 @@ import "github.com/duke-git/lancet/v2/retry"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/retry_zh-CN.md#RetryTimes)]
[[play](https://go.dev/play/p/ssfVeU2SwLO)]
### <span id="Slice">18. slice 包含操作切片的方法集合。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Slice"> 18. slice 包含操作切片的方法集合。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
```go
import "github.com/duke-git/lancet/v2/slice"
@@ -1236,13 +1235,13 @@ import "github.com/duke-git/lancet/v2/slice"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/slice_zh-CN.md#KeyBy)]
[[play](https://go.dev/play/p/uXod2LWD1Kg)]
### <span id="Stream">19. stream 流,该包仅验证简单的 stream 实现,功能有限。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Stream"> 19. stream 流,该包仅验证简单的 stream 实现,功能有限。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/stream"
```
#### Function list:
#### 函数列表:
- **<big>Of</big>** : 创建元素为指定值的 stream。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/stream_zh-CN.md#Of)]
@@ -1323,13 +1322,13 @@ import "github.com/duke-git/lancet/v2/stream"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/stream_zh-CN.md#ToSlice)]
[[play](https://go.dev/play/p/jI6_iZZuVFE)]
### <span id="Structs">20. structs 提供操作 struct, tag, field 的相关函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Structs"> 20. structs 提供操作 struct, tag, field 的相关函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/structs"
```
#### Function list:
#### 函数列表:
- **<big>New</big>** : `Struct`结构体的构造函数。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/structs/struct_zh-CN.md#New)]
@@ -1358,7 +1357,7 @@ import "github.com/duke-git/lancet/v2/structs"
- **<big>IsSlice</big>** : 判断属性是否是切片。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/structs/field_zh-CN.md#IsSlice)]
### <span id="Strutil">21. strutil 包含字符串处理的相关函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Strutil"> 21. strutil 包含字符串处理的相关函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/strutil"
@@ -1477,7 +1476,7 @@ import "github.com/duke-git/lancet/v2/strutil"
- **<big>RemoveWhiteSpace</big>** : 删除字符串中的空格。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/strutil_zh-CN.md#RemoveWhiteSpace)]
### <span id="System">22. system 包含 os, runtime, shell command 的相关函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="System"> 22. system 包含 os, runtime, shell command 的相关函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/system"
@@ -1513,7 +1512,7 @@ import "github.com/duke-git/lancet/v2/system"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/system_zh-CN#GetOsBits)]
[[play](https://go.dev/play/p/ml-_XH3gJbW)]
### <span id="Tuple">23. Tuple 包实现一个元组数据类型。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Tuple"> 23. Tuple 包实现一个元组数据类型。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/tuple"
@@ -1594,7 +1593,7 @@ import "github.com/duke-git/lancet/v2/tuple"
- **<big>Unzip10</big>** : 根据传入的Tuple10切片创建一组和Tuple10元素相对应的切片。
[[doc](https://github.com/duke-git/lancet/blob/main/docs/tuple_zh-CN.md#Unzip10)]
### <span id="Validator">24. validator 验证器包,包含常用字符串格式验证函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Validator"> 24. validator 验证器包,包含常用字符串格式验证函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/validator"
@@ -1702,7 +1701,7 @@ import "github.com/duke-git/lancet/v2/validator"
[[doc](https://github.com/duke-git/lancet/blob/main/docs/validator_zh-CN.md#IsPrintable)]
[[play](https://go.dev/play/p/Pe1FE2gdtTP)]
### <span id="Xerror">25. xerror 包实现一些错误处理函数。</span>&nbsp; &nbsp; &nbsp; &nbsp; [回到目录](#index)
<h3 id="Xerror"> 25. xerror 包实现一些错误处理函数。&nbsp; &nbsp; &nbsp; &nbsp;<a href="#index">回到目录</a></h3>
```go
import "github.com/duke-git/lancet/v2/xerror"