goctl-intellij icon indicating copy to clipboard operation
goctl-intellij copied to clipboard

protoc file error when no package defined

Open SaneHe opened this issue 3 years ago • 0 comments

// 显示声明使用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

SaneHe avatar Feb 16 '22 05:02 SaneHe