When Use?
One case is when writing functions that operate on container-types defined by the language: slices, maps and channels.
If a function has parameters with these types and the function code makes no specific assumptions about the types of elements, it can be useful to use a type-parameter.
Another case where type-parameters can be useful is for general purpose data structures.
A general purpose data structure is something like a slice or a map, but not built into the language like a linked-list or a binary tree.
p>
For more information on when to use generics, see an article by clicking
here