Lets say that I have the following:
type A Interface{
....
}
//Implements A
type B struct{
....
}
//Imlements A
type C struct{
....
}
And now I have a function which accepts variable of type A
as an argument:
func Foo(obj A){
if A is B{
....
}else if A is C{
....
}
}
And a main
function:
func main(){
b := B{}
Foo(b)
}
How can I check if the argument passed to the function is actually type B
?