5 ms·
"oneof" construction is here for two reasons: 1. It enhances readability 2. It would be a surprise to you: oneof actually enhances type safety. It is just lack
by LOLOLOLO1 8y ago
"oneof" construction is here for two reasons:
1. It enhances readability
2. It would be a surprise to you: oneof actually enhances type safety. It is just lacking type system of Go where you cannot express the feature and thus loses type safety.