Nathan Baulch
7170719ec0
lint: unit test improvements ( #674 )
...
* lint: pin golangci-lint version
* lint: use is.Empty where possible
* lint: use is.ElementsMatch for unsorted slices
* lint: remove redundant is.Len assertions
* lint: use is.Zero to assert zero structs
* fix: misc assertion issues
* lint: more consistent test case pattern
* fix: reversed expect/actual assert values
* lint: use is.ErrorIs and is.EqualError for errors
* Update golangci-lint version in workflow
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2025-09-24 21:02:52 +02:00
Samuel Berthe
9c8308ffda
Style add golangci config ( #670 )
...
* style(lint): gofumpt
* style(lint): errcheck
* style(lint): revive
* style(lint): gocritic
* style(lint): forcetypeassert
* style(lint): add .golangci.yml
* oops
2025-09-20 01:37:51 +02:00
Nathan Baulch
76b76a7adb
lint: Apply testifylint linter recommendations ( #669 )
2025-09-20 00:50:00 +02:00
Xin Hao
f1c337945a
feat: Add IsNotNil ( #523 )
...
* Add IsNotNil
* Apply suggestions from code review
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2025-01-26 16:19:29 +01:00
Samuel Berthe
ab471406ed
feat: adding CoalesceMap
2025-01-25 16:38:37 +01:00
chg1f
8795ac7ff0
feat: Implement CoalesceOrEmptySlice Function
2025-01-25 16:18:48 +01:00
SnowOnion
9c6999edf6
docs: clarify Empty
returns zero value ( #543 )
...
* docs: clarify `Empty` returns zero value
https://go.dev/ref/spec#The_zero_value does not define "empty value". It informally mentions "empty value", meaning (non-nil && 0-length) slice or map.
> Note that the zero value for a slice or map type is not the same as an initialized but empty value of the same type.
* docs: other "empty value" -> "zero value"
---------
Co-authored-by: xuanhong <litianchi@papegames.net >
2025-01-24 22:10:28 +01:00
Samuel Berthe
fd136b8a23
lint 💄
2024-08-18 21:40:25 +02:00
Samuel Berthe
f3ee53b393
lint 💄
2024-08-18 21:30:09 +02:00
Samuel Berthe
cb150f5d38
feat: adding FromSlicePtrOr ( #506 )
2024-07-26 07:56:32 +02:00
Masakazu Ohtsuka
aa609e4f47
feat: add FromSlicePtr ( #217 )
...
* feat: add FromSlicePtr
* Update README.md
---------
Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr >
2024-07-26 07:51:40 +02:00
Samuel Berthe
0a145c7cc7
style: replace interface{} by any
2024-06-30 03:34:15 +02:00
Gustavo Okuyama
c4d8094a42
feat(type_manipulation): add Nil ( #383 )
...
Co-authored-by: Gustavo Okuyama <gustavo.okuyama@ifood.com.br >
2024-06-27 23:38:37 +02:00
Samuel Berthe
9999d6b13d
feat: adding CoalesceOrEmpty ( #469 )
2024-06-27 15:42:12 +02:00
Samuel Berthe
21395c58ff
style: linting IsNil
2023-12-02 15:14:23 +01:00
Eduardo R. Golding
2bbb3ea5f7
Add IsNil function for checking nil values in Go ( #399 )
2023-12-02 14:48:43 +01:00
Oganes Mirzoyan
56f34e0891
Add EmptyableToPtr ( #311 )
...
* Add EmptyableToPtr
2023-03-20 18:05:30 +01:00
Anandraj Elumalai
27d881052b
fix: resolved code smells ( #258 )
...
Made the project to smell good
Co-authored-by: aelumalai <aelumalai@paypal.com >
2022-10-31 15:48:04 +01:00
Samuel Berthe
31f3bc3a85
test: parallel tests everywhere ( #228 )
2022-10-02 21:38:26 +02:00
Corentin Clabaut
8290287793
Add FromPtrOr ( #177 )
2022-07-24 21:35:10 +02:00
Samuel Berthe
d61070e677
feat: adding lo.IsNotEmpty
2022-07-05 00:55:24 +02:00
Samuel Berthe
4149716ede
feat: add IsEmpty helper
2022-07-03 21:33:14 +02:00
Samuel Berthe
3f53c7c09d
doc: add FromPtr
2022-07-03 20:48:33 +02:00
Freddy
b22b63655c
feat: add FromPtr
function ( #165 )
2022-07-03 19:17:24 +02:00
lu4p
305f565368
remove unnecessary explicit typeparams ( #134 )
2022-05-11 13:10:36 +02:00
Samuel Berthe
e0853ca970
feat: Add FromAnySlice ( #133 )
...
* feat: adding FromAnySlice helper
2022-05-10 15:43:34 +02:00