我正在使用 grpc golang 在客户端和服务器应用程序之间进行通信。下面是 protoc 缓冲区的代码。
syntax = "proto3";
package Trail;
service TrailFunc {
rpc HelloWorld (Request) returns (Reply) {}
}
// The request message containing the user's name.
message Request {
map<string,string> inputVar = 1;
}
// The response message containing the greetings
message Reply {
string outputVar = 1;
}
我需要在消息数据结构中创建一个类型为 map[string]interface{} 的字段 inputVar,而不是 map[string]string。我怎样才能实现它?提前致谢。