Go – x.(T) Type Assertions

An interface variable can store any non-interface concrete value, which is really useful when you are not sure about your variable type.

Because interface variable can be any kind of concrete value, we need a good way to determine the REAL value type of interface variable is to use Type Assertions from Go.
Continue reading

Advertisements