I am using "oneof" tag in my proto file but getting error while using it.
Msg.proto
// THIS DOESN'T WORK
message Msg1 {
required string id = 1;
repeated string name = 2;
// Use either of them
oneof login_oneof {
string email = 3;
string username = 4;
}
map<int32, string> maps = 3;
}
// THIS WORKS
message Msg2 {
required string id = 1;
repeated string name = 2;
optional string email = 3;
optional string username = 4;
}
Error:
lua entry thread aborted: runtime error: Lexical error in line 6, near "p = 2;\n\n o": expected '}'