func Test(t T){
t.(A).xxx
}
T is an interface. The purpose of
is to make the method a little more flexible, but will there be performance problems if you use it too much?
func Test(t T){
t.(A).xxx
}
T is an interface. The purpose of
is to make the method a little more flexible, but will there be performance problems if you use it too much?
Type conversion involves run-time security checks
in order to ensure type safety, type determination needs to perform a series of checking operations when Go is running.
also has a greater performance impact when converting interface A to interface B, because it needs to check and ensure that one interface implements another.
have seen this question before
you can take a look at this article
https://stackoverflow.com/que.