The Blog of Boban Acimovic · Dec 3, 2022
Check type of generic parameter in Go
0Sign in to vote or save
This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.
Go is over ten years old language but generics (type parameters) are introduced just in the March this year. Hence, still lot of developers avoid using them or have certain problems once decided to give it a try. One of the common problems is how to check the concrete type of a generic parameter, specially of non constrained parameters. So, if you try to do the following, it won’t work:

Comments
Nothing yet. Say the first thing.
Sign in to join the conversation.