From c524eb04a1b8f9c523741dba5030d76235ccc383 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Sun, 24 Apr 2022 10:32:55 +0800 Subject: [PATCH] docs: add doc for concurrency in readme file --- README.md | 20 +++++++++++++++++++- README_zh-CN.md | 20 +++++++++++++++++++- 2 files changed, 38 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 1bc9b3e..91de1c6 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ English | [简体中文](./README_zh-CN.md) ## Feature - 👏 Comprehensive, efficient and reusable. -- 💪 250+ go util functions, support string, slice, datetime, net, crypt... +- 💪 300+ go util functions, support string, slice, datetime, net, crypt... - 💅 Only depend on the go standard library. - 🌍 Unit test for every exported function. @@ -89,6 +89,24 @@ import "github.com/duke-git/lancet/v2/algorithm" - [LRUCache](https://github.com/duke-git/lancet/blob/main/docs/algorithm.md#LRUCache) + +### Concurrency package contain some functions to support concurrent programming. eg, goroutine, channel, async. + +```go +import "github.com/duke-git/lancet/v2/concurrency" +``` +#### Function list: +- [NewChannel](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#NewChannel) +- [Bridge](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Bridge) +- [FanIn](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#FanIn) +- [Generate](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Generate) +- [Or](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Or) +- [OrDone](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#OrDone) +- [Repeat](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Repeat) +- [RepeatFn](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#RepeatFn) +- [Take](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Take) +- [Tee](https://github.com/duke-git/lancet/blob/main/docs/concurrency.md#Tee) + ### Convertor package contains some functions for data convertion. ```go diff --git a/README_zh-CN.md b/README_zh-CN.md index ff7450a..500aa09 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -23,7 +23,7 @@ ## 特性 - 👏 全面、高效、可复用 -- 💪 250+常用go工具函数,支持string、slice、datetime、net、crypt... +- 💪 300+常用go工具函数,支持string、slice、datetime、net、crypt... - 💅 只依赖go标准库 - 🌍 所有导出函数单元测试覆盖率100% @@ -88,6 +88,24 @@ import "github.com/duke-git/lancet/v2/algorithm" - [LinearSearch](https://github.com/duke-git/lancet/blob/main/docs/algorithm_zh-CN.md#LinearSearch) - [LRUCache](https://github.com/duke-git/lancet/blob/main/docs/algorithm_zh-CN.md#LRUCache) + +### 并发包包含一些支持并发编程的功能。例如:goroutine, channel, async等。 + +```go +import "github.com/duke-git/lancet/v2/concurrency" +``` +#### Function list: +- [NewChannel](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#NewChannel) +- [Bridge](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Bridge) +- [FanIn](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#FanIn) +- [Generate](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Generate) +- [Or](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Or) +- [OrDone](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#OrDone) +- [Repeat](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Repeat) +- [RepeatFn](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#RepeatFn) +- [Take](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Take) +- [Tee](https://github.com/duke-git/lancet/blob/main/docs/concurrency_zh-CN.md#Tee) + ### convertor转换器包支持一些常见的数据类型转换。 ```go