But you must understand your Java app won’t have performance advantage because of faster alloc speed IRL: GC will take lots of CPU, because Go’s one is much easier at memory release. You can only see allocation advantage in micro benchmarks where the app stops before the GC will start.
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.
Protobuf has first class enum support and also provides a thing called "oneof". Go doesn't have anything of this.
So, it is clearly not the right tool for the job. Sorry guys, you are wasting your time sticking to Go constructs only.