thoas / go-funk

A modern Go utility library which provides helpers (map, find, contains, filter, ...)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

IsEmpty check error

charmfocus opened this issue · comments

commented
type MyString string

var myStr MyString
ck := funk.IsEmpty(myStr)
fmt.Println(ck)// print false

This is how it works in go: Read more about it here: https://www.calhoun.io/when-nil-isnt-equal-to-nil/

To fix your issue you can probably do:

ck := funk.IsEmpty(string(myStr))