Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protoc file error when no package defined #11

Open
SaneHe opened this issue Feb 16, 2022 · 0 comments
Open

protoc file error when no package defined #11

SaneHe opened this issue Feb 16, 2022 · 0 comments

Comments

@SaneHe
Copy link

SaneHe commented Feb 16, 2022

// 显示声明使用proto3, 否则使用默认的proto2
syntax = "proto3";

//package javaDemo;

// 服务定义
service General {
    // call方法,格式为"方法名 请求参数 返回参数"
    rpc call (GeneralRequest) returns (GeneralReply) {}
}

// 方法请求,包含用户名
message GeneralRequest {
    string data = 1;
}

// 方法响应,包含响应的消息
message GeneralReply {
    string message = 1;
}

error image:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant