Commit Graph

24 Commits

Author SHA1 Message Date
Samuel Berthe
3bc887c57c doc: adding go playground examples 2025-09-23 14:54:30 +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
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
snamiki1212
407b62d3f1 docs: fix example README, add playground (FromSlicePtrOr) (#541)
* doc: update FromSlicePtrOr example in README

* doc: add playground for FromSlicePtrOr

* Update README.md

---------

Co-authored-by: Samuel Berthe <dev@samuel-berthe.fr>
2024-10-01 18:54:43 +02:00
Nathan Baulch
db0f4d2171 Tidy up (#519) 2024-08-22 01:17:02 +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
61209816d1 feat: speed up loops by reducing allocations (#475) 2024-06-28 01:35:57 +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
Ian Mikhailov
8c0dc3cd91 [master] ToSlicePtr: improve speed (#465)
Co-authored-by: Yan Mikhaylov Andreevich <myan@ozon.ru>
2024-06-27 12:42:21 +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
Samuel Berthe
01fc0fdb4c bump v1.38.1 2023-03-21 04:40:24 +01:00
Oganes Mirzoyan
56f34e0891 Add EmptyableToPtr (#311)
* Add EmptyableToPtr
2023-03-20 18:05:30 +01: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
Samuel Berthe
e0853ca970 feat: Add FromAnySlice (#133)
* feat: adding FromAnySlice helper
2022-05-10 15:43:34 +02:00