Check if the structure implements an interface in Go
There are two options for checking: at compile time and in runtime. At compile time To check interface methods implementation, you can use typed nil. It does not contain any data by itself, it does not require allocation, but it has a type that can be read and used. If the structure does not implement …
Check if the structure implements an interface in Go Read More »