Update server.go (#2027)

pull/2032/head
songzhibin97 3 years ago committed by GitHub
parent 0c511808ce
commit b49b7c6ca8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      cmd/kratos/internal/proto/server/server.go

@ -63,12 +63,13 @@ func run(cmd *cobra.Command, args []string) {
} }
for _, e := range s.Elements { for _, e := range s.Elements {
r, ok := e.(*proto.RPC) r, ok := e.(*proto.RPC)
if ok { if !ok {
cs.Methods = append(cs.Methods, &Method{ continue
Service: s.Name, Name: caser.String(r.Name), Request: r.RequestType,
Reply: r.ReturnsType, Type: getMethodType(r.StreamsRequest, r.StreamsReturns),
})
} }
cs.Methods = append(cs.Methods, &Method{
Service: s.Name, Name: caser.String(r.Name), Request: r.RequestType,
Reply: r.ReturnsType, Type: getMethodType(r.StreamsRequest, r.StreamsReturns),
})
} }
res = append(res, cs) res = append(res, cs)
}), }),

Loading…
Cancel
Save