dudaodong
b0e9758e0d
Merge branch 'v2' of github.com:duke-git/lancet into v2
2022-01-09 22:15:18 +08:00
donutloop
7b9a8a55e7
Slice: CountV2 ( #18 )
...
Use generic instead of reflection
2022-01-09 22:15:03 +08:00
dudaodong
44ac82e8b8
refactor: rewrite some slice functions with go generics
2022-01-09 22:14:46 +08:00
dudaodong
c4b4cb1173
merge master: rewrite all unit test functions with assert
2022-01-09 18:33:00 +08:00
dudaodong
bbfc5b7060
delete file utils.go and fix some misspel
2022-01-09 16:12:26 +08:00
dudaodong
1f45937190
refactor: rewrite all unit test functions with assert
2022-01-09 16:04:33 +08:00
dudaodong
52c5a91606
refactor: rewrite all unit test functions with assert
2022-01-09 15:57:21 +08:00
dudaodong
49f62c3550
refactor: rewrite all unit test functions with assert
2022-01-09 15:53:30 +08:00
dudaodong
23701e6998
refactor: rewrite all unit test functions with assert
2022-01-09 15:49:52 +08:00
dudaodong
1199c30ef3
refactor: rewrite all unit test functions with assert
2022-01-09 15:48:29 +08:00
dudaodong
b0e17c7bc4
refactor: rewrite all unit test functions with assert
2022-01-09 15:39:50 +08:00
dudaodong
d3525dfe8f
refactor: rewrite all unit test functions with assert
2022-01-09 15:34:17 +08:00
dudaodong
9da7115169
refactor: rewrite all unit test functions with assert
2022-01-09 15:10:56 +08:00
dudaodong
9cb9aa2f2f
refactor: rewrite all unit test functions with assert
2022-01-09 14:46:17 +08:00
dudaodong
e4cd7dad35
refactor: rewrite all unit test functions with assert
2022-01-09 14:31:31 +08:00
dudaodong
31e08197d4
remove file comment
2022-01-09 14:03:46 +08:00
dudaodong
642d0b8077
refactor: rewrite all unit test functions with assert
2022-01-09 14:01:51 +08:00
dudaodong
25b2ae6b98
fix: return empty byte slice when rand bytes lenght less 1
2022-01-09 14:00:23 +08:00
dudaodong
65719515bd
feat: add LessOrEqual and GreaterOrEqual
2022-01-09 13:58:27 +08:00
dudaodong
3ffd81a98a
refactor: rewrite all unit test functions with assert
2022-01-09 13:51:07 +08:00
dudaodong
f490ef2404
refactor: rewrite all unit test functions with assert
2022-01-09 13:30:08 +08:00
dudaodong
3438f3b18a
refactor: rewrite all unit test functions with assert
2022-01-09 13:07:49 +08:00
dudaodong
73f4ae7b35
refactor: add internal/assert.go and rewrite all unit funcs string_test.go with assert
2022-01-08 21:58:35 +08:00
donutloop
30d798366b
Slice: find v2 ( #17 )
...
* If slice len is zero then return false
* Convert find to generic form.
* If return T is nil then no items matched the predicate func
2022-01-07 20:19:27 +08:00
dudaodong
3e9a2b5c59
refactor: refact Filter, ForEach, Map func with generics
2022-01-07 17:53:55 +08:00
dudaodong
1343683b08
checkout v2 branch for generics migration
2022-01-07 17:48:00 +08:00
rumikk
a8996933bf
ToJson fix error handling ( #16 )
2022-01-07 15:00:05 +08:00
donutloop
3905c0bde1
Slice: Add count func ( #15 )
...
Returns the count of matched elements
2022-01-06 20:32:14 +08:00
dudaodong
c7e961704d
Merge branch 'main' of github.com:duke-git/lancet into main
v1.1.8
2022-01-06 17:09:43 +08:00
dudaodong
cb7df1b57d
update: add some new feature comments for file and slice
2022-01-06 17:09:01 +08:00
dudaodong
eeff28606e
feat: add IsLink, FileMode, MiMeType funcs for file
2022-01-06 16:53:32 +08:00
dudaodong
86d4b25a2b
feat: and Zip and UnZip func for file operation
2022-01-06 15:15:59 +08:00
Ahmad Alfy
ad287ed99a
doc: minor spelling mistak ( #14 )
2022-01-05 21:25:21 +08:00
dudaodong
df9de3065b
feat: add ForEach func
2022-01-05 20:17:16 +08:00
dudaodong
71a2ea3f20
update: change case name for TestNone func
2022-01-05 19:46:51 +08:00
dudaodong
955f2e6de6
update func GetElapsedTime and None comment
2022-01-05 19:44:22 +08:00
donutloop
4aef9d6d22
Slice: Add none func ( #13 )
...
Returns true whether no elements of this slice match the provided predicate
func. Negated form of Every func
2022-01-05 19:38:14 +08:00
dudaodong
4752725dd6
add Wrap and Unwrap func comment
2022-01-04 11:22:54 +08:00
dudaodong
07d1704cb2
release v1.1.7
v1.1.7
2022-01-04 10:56:05 +08:00
dudaodong
74d262e609
Merge branch 'main' of github.com:duke-git/lancet into main
2022-01-03 20:11:32 +08:00
dudaodong
97e0789ea4
feat: add Wrap and Unwrap func
2022-01-03 20:11:15 +08:00
donutloop
bc39b0887b
Filter: remove second loop and indexes slice ( #12 )
...
Use less memory and cpu resources to filter out elements from the slice.
2022-01-03 20:10:15 +08:00
dudaodong
4fd8a18677
release v1.1.6
v1.1.6
2022-01-03 15:58:19 +08:00
dudaodong
3de906d7c9
refactor: reduce gocyclo of doHttpRequest func
2022-01-03 15:53:25 +08:00
dudaodong
56fc12c660
refactor: reduce gocyclo of ToString func
2022-01-03 15:15:22 +08:00
dudaodong
7a9b0847f9
fix: fix some go line issue in go report card
2022-01-03 14:57:14 +08:00
dudaodong
9266d99249
add chinese comment for GroupBy func
2022-01-02 22:12:01 +08:00
donutloop
f15131f032
Slice: find nothing case ( #11 )
...
The current behavior can result into wired edge cases.
**Current behavior**
if find was unsuccessfully then it will return the first element of the
slice
**Desired behavior**
if find was unsuccessfully then it should return negative ok and a none
value
2022-01-02 22:05:27 +08:00
donutloop
b4a49fccfd
Slice: Add GroupBy func ( #10 )
...
Group by: split slice into two groups, applies on each slice element a
predicate func to categorize this element.
Changes
* Add groub by func
* Add test case for this func
2022-01-02 21:24:56 +08:00
dudaodong
94b1a1d383
feat: add Reset func for watcher
v1.1.5
2022-01-01 20:14:41 +08:00