From c5c3888ffcb4526ba7444421aea9621fba95267a Mon Sep 17 00:00:00 2001 From: Gregory Koganovskiy Date: Fri, 29 Dec 2023 05:12:29 +0300 Subject: [PATCH] Fix typos in README (#154) --- README.md | 64 +++++++++++++++++++++++++++---------------------------- 1 file changed, 32 insertions(+), 32 deletions(-) diff --git a/README.md b/README.md index 257c4d06..a49c182f 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ ### Note: -1. For users who use go1.18 and above, it is recommended to install lancet v2.x.x. Cause in v2.x.x all functions was rewriten with generics of go1.18. +1. For users who use go1.18 and above, it is recommended to install lancet v2.x.x. Cause in v2.x.x all functions were rewritten with generics of go1.18. ```go go get github.com/duke-git/lancet/v2 // will install latest version of v2.x.x @@ -201,10 +201,10 @@ import "github.com/duke-git/lancet/v2/concurrency" - **OrDone** : read a channel into another channel, will close until cancel context. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#OrDone)] [[play](https://go.dev/play/p/lm_GoS6aDjo)] -- **Repeat** : create channel, put values into the channel repeatly until cancel the context. +- **Repeat** : create channel, put values into the channel repeatedly until cancel the context. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#Repeat)] [[play](https://go.dev/play/p/k5N_ALVmYjE)] -- **RepeatFn** : create a channel, excutes fn repeatly, and put the result into the channel, until close context. +- **RepeatFn** : create a channel, executes fn repeatedly, and put the result into the channel, until close context. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/concurrency.md#RepeatFn)] [[play](https://go.dev/play/p/4J1zAWttP85)] - **Take** : create a channel whose values are taken from another channel with limit number. @@ -247,7 +247,7 @@ import "github.com/duke-git/lancet/v2/condition" [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/condition.md#TernaryOperator)] [[play](https://go.dev/play/p/ElllPZY0guT)] -

5. Convertor package contains some functions for data convertion.        index

+

5. Convertor package contains some functions for data conversion.        index

```go import "github.com/duke-git/lancet/v2/convertor" @@ -596,7 +596,7 @@ import "github.com/duke-git/lancet/v2/datetime" [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/datetime.md#TimestampNano)] [[play](https://go.dev/play/p/A9Oq_COrcCF)] -

8. Datastructure package constains some common data structure. eg. list, linklist, stack, queue, set, tree, graph.        index

+

8. Datastructure package contains some common data structure. eg. list, linklist, stack, queue, set, tree, graph.        index

```go import list "github.com/duke-git/lancet/v2/datastructure/list" @@ -754,10 +754,10 @@ import "github.com/duke-git/lancet/v2/function" #### Function list: -- **After** : return a function that invokes passed funcation once the returned function is called more than n times. +- **After** : return a function that invokes passed function once the returned function is called more than n times. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#After)] [[play](https://go.dev/play/p/eRD5k2vzUVX)] -- **Before** : return a function that invokes passed funcation once the returned function is called less than n times +- **Before** : return a function that invokes passed function once the returned function is called less than n times [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Before)] [[play](https://go.dev/play/p/0HqUDIFZ3IL)] - **CurryFn** : make a curry function. @@ -778,7 +778,7 @@ import "github.com/duke-git/lancet/v2/function" - **Pipeline** : takes a list of functions and returns a function whose param will be passed into the functions one by one. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Pipeline)] [[play](https://go.dev/play/p/mPdUVvj6HD6)] -- **Watcher** : Watcher is used for record code excution time. can start/stop/reset the watch timer. get the elapsed time of function execution. +- **Watcher** : Watcher is used for record code execution time. can start/stop/reset the watch timer. get the elapsed time of function execution. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/function.md#Watcher)] [[play](https://go.dev/play/p/l2yrOpCLd1I)] @@ -793,7 +793,7 @@ import "github.com/duke-git/lancet/v2/maputil" - **MapTo** : quick map any value to struct or any base type. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#MapTo)] [[play](https://go.dev/play/p/4K7KBEPgS5M)] -- **ForEach** : executes iteratee funcation for every key and value pair in map. +- **ForEach** : executes iteratee function for every key and value pair in map. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#ForEach)] [[play](https://go.dev/play/p/OaThj6iNVXK)] - **Filter** : iterates over map, return a new map contains all key and value pairs pass the predicate function. @@ -811,7 +811,7 @@ import "github.com/duke-git/lancet/v2/maputil" - **OmitByKeys** : the opposite of FilterByKeys, extracts all the map elements which keys are not omitted. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OmitByKeys)] [[play](https://go.dev/play/p/jXGrWDBfSRp)] -- **OmitByValues** : the opposite of FilterByValues. remov all elements whose value are in the give slice. +- **OmitByValues** : the opposite of FilterByValues. remove all elements whose value are in the give slice. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/maputil.md#OmitByValues)] [[play](https://go.dev/play/p/XB7Y10uw20_U)] - **Intersect** : iterates over maps, return a new map of key and value pairs in all given maps. @@ -961,7 +961,7 @@ import "github.com/duke-git/lancet/v2/mathutil" - **Sum** : return sum of passed numbers. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Sum)] [[play](https://go.dev/play/p/1To2ImAMJA7)] -- **Abs** : returns the absolute value of param nubmer. +- **Abs** : returns the absolute value of param number. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/mathutil.md#Sum)] [[play](https://go.dev/play/p/fsyBh1Os-1d)] @@ -1012,7 +1012,7 @@ import "github.com/duke-git/lancet/v2/netutil" - **DecodeResponse** : decode http response into target object. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#DecodeResponse)] [[play](https://go.dev/play/p/jUSgynekH7G)] -- **StructToUrlValues** : convert struct to url valuse. +- **StructToUrlValues** : convert struct to url values. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/netutil.md#StructToUrlValues)] [[play](https://go.dev/play/p/pFqMkM40w9z)] - **HttpGetdeprecated** : send http get request. @@ -1157,7 +1157,7 @@ import "github.com/duke-git/lancet/v2/slice" - **Chunk** : creates a slice of elements split into groups the length of size. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Chunk)] [[play](https://go.dev/play/p/b4Pou5j2L_C)] -- **Compact** : creates an slice with all falsey values removed. The values false, nil, 0, and "" are falsey. +- **Compact** : creates an slice with all falsy values removed. The values false, nil, 0, and "" are falsy. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#Compact)] [[play](https://go.dev/play/p/pO5AnxEr3TK)] - **Concat** : creates a new slice concatenating slice with any additional slices. @@ -1238,7 +1238,7 @@ import "github.com/duke-git/lancet/v2/slice" - **GroupBy** : iterate over elements of the slice, each element will be group by criteria, returns two slices. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#GroupBy)] [[play](https://go.dev/play/p/QVkPxzPR0iA)] -- **GroupWith** : return a map composed of keys generated from the resultults of running each element of slice thru iteratee. +- **GroupWith** : return a map composed of keys generated from the results of running each element of slice thru iteratee. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/slice.md#GroupWith)] [[play](https://go.dev/play/p/ApCvMNTLO8a)] - **IntSlicedeprecated** : convert param to int slice. @@ -1377,7 +1377,7 @@ import "github.com/duke-git/lancet/v2/stream" - **FromRange** : creates a number stream from start to end. both start and end are included. [start, end] [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/stream.md#FromRange)] [[play](https://go.dev/play/p/9Ex1-zcg-B-)] -- **Generate** : creates a stream where each element is generated by the provided generater function. +- **Generate** : creates a stream where each element is generated by the provided generator function. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/stream.md#Generate)] [[play](https://go.dev/play/p/rkOWL1yA3j9)] - **Concat** : creates a lazily concatenated stream whose elements are all the elements of the first stream followed by all the elements of the second stream. @@ -1422,10 +1422,10 @@ import "github.com/duke-git/lancet/v2/stream" - **FindLast** : returns the last element of this stream and true, or zero value and false if the stream is empty. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/stream.md#FindLast)] [[play](https://go.dev/play/p/WZD2rDAW-2h)] -- **Max** : returns the maximum element of this stream according to the provided less function. less fuction: a > b +- **Max** : returns the maximum element of this stream according to the provided less function. less function: a > b [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/stream.md#Max)] [[play](https://go.dev/play/p/fm-1KOPtGzn)] -- **Min** : returns the minimum element of this stream according to the provided less function. less fuction: a < b +- **Min** : returns the minimum element of this stream according to the provided less function. less function: a < b [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/stream.md#Min)] [[play](https://go.dev/play/p/vZfIDgGNRe_0)] - **AllMatch** : returns whether all elements of this stream match the provided predicate. @@ -1470,7 +1470,7 @@ import "github.com/duke-git/lancet/v2/structs" [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/structs/field.md#Kind)] - **IsEmbedded** : check if the field is an embedded field. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/structs/field.md#IsEmbedded)] -- **IsExported** : check if the field is exporte +- **IsExported** : check if the field is exported [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/structs/field.md#IsExported)] - **IsZero** : check if the field is zero value [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/structs/field.md#IsZero)] @@ -1644,7 +1644,7 @@ import "github.com/duke-git/lancet/v2/tuple" #### Function list: -- **Tuple2** : represents a 2 elemnets tuple. +- **Tuple2** : represents a 2 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple2)] [[play](https://go.dev/play/p/3sHVqBQpLYN)] - **Tuple2_Unbox** : returns values in Tuple2. @@ -1656,7 +1656,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip2** : create a group of slice from a slice of Tuple2. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip2)] [[play](https://go.dev/play/p/KBecr60feXb)] -- **Tuple3** : represents a 3 elemnets tuple. +- **Tuple3** : represents a 3 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple3)] [[play](https://go.dev/play/p/FtH2sdCLlCf)] - **Tuple3_Unbox** : returns values in Tuple3. @@ -1668,7 +1668,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip3** : create a group of slice from a slice of Tuple3. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip3)] [[play](https://go.dev/play/p/bba4cpAa7KO)] -- **Tuple4** : represents a 4 elemnets tuple. +- **Tuple4** : represents a 4 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple4)] [[play](https://go.dev/play/p/D2EqDz096tk)] - **Tuple4_Unbox** : returns values in Tuple4. @@ -1680,7 +1680,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip4** : create a group of slice from a slice of Tuple4. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip4)] [[play](https://go.dev/play/p/rb8z4gyYSRN)] -- **Tuple5** : represents a 5 elemnets tuple. +- **Tuple5** : represents a 5 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple5)] [[play](https://go.dev/play/p/2WndmVxPg-r)] - **Tuple5_Unbox** : returns values in Tuple4. @@ -1692,7 +1692,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip5** : create a group of slice from a slice of Tuple5. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip5)] [[play](https://go.dev/play/p/gyl6vKfhqPb)] -- **Tuple6** : represents a 6 elemnets tuple. +- **Tuple6** : represents a 6 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple6)] [[play](https://go.dev/play/p/VjqcCwEJZbs)] - **Tuple6_Unbox** : returns values in Tuple6. @@ -1704,7 +1704,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip6** : create a group of slice from a slice of Tuple6. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip6)] [[play](https://go.dev/play/p/l41XFqCyh5E)] -- **Tuple7** : represents a 7 elemnets tuple. +- **Tuple7** : represents a 7 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple7)] [[play](https://go.dev/play/p/dzAgv_Ezub9)] - **Tuple7_Unbox** : returns values in Tuple7. @@ -1716,7 +1716,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip7** : create a group of slice from a slice of Tuple7. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip7)] [[play](https://go.dev/play/p/hws_P1Fr2j3)] -- **Tuple8** : represents a 8 elemnets tuple. +- **Tuple8** : represents a 8 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple8)] [[play](https://go.dev/play/p/YA9S0rz3dRz)] - **Tuple8_Unbox** : returns values in Tuple8. @@ -1728,7 +1728,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip8** : create a group of slice from a slice of Tuple8. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip8)] [[play](https://go.dev/play/p/1SndOwGsZB4)] -- **Tuple9** : represents a 9 elemnets tuple. +- **Tuple9** : represents a 9 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple9)] [[play](https://go.dev/play/p/yS2NGGtZpQr)] - **Tuple9_Unbox** : returns values in Tuple9. @@ -1740,7 +1740,7 @@ import "github.com/duke-git/lancet/v2/tuple" - **Unzip9** : create a group of slice from a slice of Tuple9. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Unzip9)] [[play](https://go.dev/play/p/91-BU_KURSA)] -- **Tuple10** : represents a 10 elemnets tuple. +- **Tuple10** : represents a 10 elements tuple. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/tuple.md#Tuple10)] [[play](https://go.dev/play/p/799qqZg0hUv)] - **Tuple10_Unbox** : returns values in Tuple10. @@ -1872,19 +1872,19 @@ import "github.com/duke-git/lancet/v2/validator" - **IsJWT** : check if a give string is a valid JSON Web Token (JWT). [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsJWT)] [[play](https://go.dev/play/p/R6Op7heJbKI)] -- **IsVisa** : check if a give string is a valid visa card nubmer or not. +- **IsVisa** : check if a give string is a valid visa card number or not. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsVisa)] [[play](https://go.dev/play/p/SdS2keOyJsl)] -- **IsMasterCard** : check if a give string is a valid master card nubmer or not. +- **IsMasterCard** : check if a give string is a valid master card number or not. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsMasterCard)] [[play](https://go.dev/play/p/CwWBFRrG27b)] -- **IsAmericanExpress** : check if a give string is a valid american expression card nubmer or not. +- **IsAmericanExpress** : check if a give string is a valid american expression card number or not. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsAmericanExpress)] [[play](https://go.dev/play/p/HIDFpcOdpkd)] -- **IsUnionPay** : check if a give string is a valid union pay nubmer or not. +- **IsUnionPay** : check if a give string is a valid union pay number or not. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsUnionPay)] [[play](https://go.dev/play/p/CUHPEwEITDf)] -- **IsChinaUnionPay** : check if a give string is a valid china union pay nubmer or not. +- **IsChinaUnionPay** : check if a give string is a valid china union pay number or not. [[doc](https://github.com/duke-git/lancet/blob/main/docs/en/api/packages/validator.md#IsChinaUnionPay)] [[play](https://go.dev/play/p/yafpdxLiymu)]