A function that every GO developer should know by heart
Since Version 1.18 GO / Golang supports generic types.
You can use Generics to create a contains function that basically works for every type. Of course the type has to support the equality operator “==”. This can be obtained by using the comparable constraint.
Like for more!
The voice is generated with AI.
#shorts