I am playing with type assertion using the following dummy code, and I got the error:
cannot type switch on non-interface value
Doe
There are two kinds of type conversions
conversion between basic data types. For this we can use the direct casting
i := 48
str := string(i)
But type conversion using value.(type) is for conversion among the class hierarchy, (e.g. where we want to get the specific implementation from the interface). Else, we get the above error.