mirror of
https://github.com/arkadiyt/protodump.git
synced 2026-10-21 01:36:52 +02:00
Use fully qualified names for inputs
This commit is contained in:
1 parent
446d6a6c52
commit
63401cf45c
2 files changed
+6
-4
No files matched your search
@@ -5,8 +5,8 @@ package hello.world;
|
||||
option go_package = "./;helloworld";
|
||||
|
||||
service Greeter {
|
||||
rpc SayHello (HelloRequest) returns (HelloReply) {}
|
||||
rpc StreamMethodServer (StreamRequest) returns (stream StreamReply) {}
|
||||
rpc SayHello (.hello.world.HelloRequest) returns (.hello.world.HelloReply) {}
|
||||
rpc StreamMethodServer (.hello.world.StreamRequest) returns (stream .hello.world.StreamReply) {}
|
||||
}
|
||||
|
||||
message Reserved {
|
||||
|
||||
@@ -55,12 +55,14 @@ func (pd *ProtoDefinition) writeMethod(method protoreflect.MethodDescriptor) {
|
||||
if method.IsStreamingClient() {
|
||||
pd.write("stream ")
|
||||
}
|
||||
pd.write(string(method.Input().Name()))
|
||||
pd.write(".")
|
||||
pd.write(string(method.Input().FullName()))
|
||||
pd.write(") returns (")
|
||||
if method.IsStreamingServer() {
|
||||
pd.write("stream ")
|
||||
}
|
||||
pd.write(string(method.Output().Name()))
|
||||
pd.write(".")
|
||||
pd.write(string(method.Output().FullName()))
|
||||
pd.write(") {}\n")
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user