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. 5
      cmd/kratos/internal/proto/server/server.go

@ -63,13 +63,14 @@ 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 {
continue
}
cs.Methods = append(cs.Methods, &Method{ cs.Methods = append(cs.Methods, &Method{
Service: s.Name, Name: caser.String(r.Name), Request: r.RequestType, Service: s.Name, Name: caser.String(r.Name), Request: r.RequestType,
Reply: r.ReturnsType, Type: getMethodType(r.StreamsRequest, r.StreamsReturns), Reply: r.ReturnsType, Type: getMethodType(r.StreamsRequest, r.StreamsReturns),
}) })
} }
}
res = append(res, cs) res = append(res, cs)
}), }),
) )

Loading…
Cancel
Save