3 ms·
Well, you can implement methods based on the Reply interface instead. As long as there are common fields or methods that all the types have, you can have a sin
by ansible 14y ago
Well, you can implement methods based on the Reply interface instead. As long as there are common fields or methods that all the types have, you can have a single CheckStatus() that uses those.
Maybe I don't know what exactly you want.
The Foo and Bar in my example have quite different CheckStatus() methods because those two structs are quite different. If there were more similar, then you could share more code.