4b9116a5dd
This function allows you to prefix your field of type message with what you defined in the option go_package. Moreover it handles message embedded. In this commit, I rename gometalinter gas option in gosec.
31 lines
560 B
Protocol Buffer
31 lines
560 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package company;
|
|
|
|
option go_package = "models/article;article";
|
|
|
|
import "proto/common.proto";
|
|
|
|
message GetArticleRequest {
|
|
common.GetArticle getarticle = 1;
|
|
}
|
|
|
|
|
|
message GetArticleResponse {
|
|
Article article = 1;
|
|
|
|
message Storage {
|
|
string code = 1;
|
|
}
|
|
// The generated output should write []*GetArticleResponse_Storage.Storage for this field.
|
|
repeated Storage storages = 2;
|
|
}
|
|
|
|
message Article{
|
|
string id = 1;
|
|
string name = 2;
|
|
}
|
|
|
|
service articlesvc {
|
|
rpc GetArticle (GetArticleRequest) returns (GetArticleResponse){}
|
|
} |