demo-protobuf3-optional/example.proto

16 lines
299 B
Protocol Buffer
Raw Normal View History

2023-10-27 12:57:01 +08:00
syntax = "proto3";
package demo_protobuf3_optional;
option go_package = "git.jeffthecoder.xyz/public/demo-protobuf3-optional";
message WithOptional {
2023-10-27 13:05:06 +08:00
string username = 1;
optional int64 userid = 2;
2023-10-27 12:57:01 +08:00
}
message WithOneof {
2023-10-27 13:05:06 +08:00
string username = 1;
oneof optional_userid { int64 userid = 2; }
2023-10-27 12:57:01 +08:00
}