kitex icon indicating copy to clipboard operation
kitex copied to clipboard

生成的fastpb代码里,没有使用包别名

Open ethantsien opened this issue 2 years ago • 7 comments

images

image-1

image-2

image-3

hello.proto

syntax = "proto3";

package hello;
option go_package="pb/hello";

import "google/rpc/status.proto";
import "google/protobuf/any.proto";

message helloReq {

}

message helloResp {
    google.rpc.Status status = 1;
    google.protobuf.Any data = 2;
}

service api {
    rpc hello (helloReq) returns (helloResp);
}

generate command

kitex -type protobuf \
		-module gox.com/app/rpc/demo/hello \
		-I . \
		-I https://github.com/googleapis/googleapis \
		-protobuf Mgoogle/protobuf/any.proto=gox.com/app/rpc/demo/hello/kitex_gen/pb/google/protobuf/any \
		-protobuf Mgoogle/rpc/status.proto=gox.com/app/rpc/demo/hello/kitex_gen/pb/google/rpc/status \
		-service gox.com-app-rpc-demo-hello \
		hello.proto

go version go1.21.0 darwin/amd64

ethantsien avatar Sep 05 '23 12:09 ethantsien