From 955f2e6de6f03d45027806bff16910d7e8aa90d7 Mon Sep 17 00:00:00 2001 From: dudaodong Date: Wed, 5 Jan 2022 19:44:22 +0800 Subject: [PATCH] update func GetElapsedTime and None comment --- README.md | 2 +- README_zh-CN.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 8016225..3d0d8db 100644 --- a/README.md +++ b/README.md @@ -281,7 +281,7 @@ func Schedule(d time.Duration, fn interface{}, args ...interface{}) chan bool // func (w *Watcher) Start() //start the watch timer. func (w *Watcher) Stop() //stop the watch timer func (w *Watcher) Reset() {} //reset the watch timer. -func (w *Watcher) GetElapsedTime() time.Duration //获取代码段运行时间 +func (w *Watcher) GetElapsedTime() time.Duration //return time duration from watcher start to end. ``` #### 7. netutil is for net process diff --git a/README_zh-CN.md b/README_zh-CN.md index fa5cf0f..4c0c6b1 100644 --- a/README_zh-CN.md +++ b/README_zh-CN.md @@ -395,7 +395,7 @@ func Difference(slice1, slice2 interface{}) interface{} //返回 func DeleteByIndex(slice interface{}, start int, end ...int) (interface{}, error) //删除切片中start到end位置的值 func Drop(slice interface{}, n int) interface{} //创建一个新切片,当n大于0时删除原切片前n个元素,当n小于0时删除原切片后n个元素 func Every(slice, function interface{}) bool //slice中所有元素都符合函数条件时返回true, 否则返回false. 函数签名:func(index int, value interface{}) bool -func None(slice, function interface{}) bool +func None(slice, function interface{}) bool //slice中所有元素都不符合函数条件时返回true, 否则返回false. 函数签名:func(index int, value interface{}) bool func Find(slice, function interface{}) (interface{}, bool)//查找slice中第一个符合条件的元素,函数签名:func(index int, value interface{}) bool func Filter(slice, function interface{}) interface{} //过滤slice, 函数签名:func(index int, value interface{}) bool func FlattenDeep(slice interface{}) interface{} //将slice递归为一维切片。