私はgrpc golangを使ってクライアントアプリケーションとサーバーアプリケーションの間で通信しています。 以下はprotocバッファのコードです。gRPC protocバッファーgolangのmap [string]インターフェース{}の変数を作成
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]文字列ではなく、メッセージデータ構造内にmap [string] interface {}型のフィールドinputVarを作成する必要があります。 どうすれば実現できますか? ありがとうございます。
を、。しかし、私は 'map'がうまくいくかもしれないと思いますか? –
Vatine