【发布时间】:2018-12-26 04:05:40
【问题描述】:
我是 protobuf 的新手,我正在尝试编写一个 .proto 文件,其中包含从文本文件中读取的初始参数解析。
这是我的 test.proto
syntax = "proto2";
import "params_common.proto";
message TestConfig {
required bool enable = 1 [default = true];
required common.Common common = 2;
}
然后,我不知道如何为参数common 编写test.text 文件
text_format.Parse 好像不支持一次输入多个文本
这里是params_common.common
syntax = "proto2";
package common;
message Common {
required int element = 1 [default = 1];
}
提前感谢
【问题讨论】: