INNER CODE UNIT · Go
splitFunctionPath
yarpc/yarpc-go · encoding/thrift/thriftrw-plugin-yarpc/main.go:198
func splitFunctionPath(input string) (string, string) {
i := strings.LastIndex(input, ".")
return input[:i], input[i+1:]
}
func buildSvc(serviceID api.ServiceID, req *api.GenerateServiceRequest) *Svc {
service := req.Services[serviceID]
module := req.Modules[service.ModuleID]
var parents []*Svc
if service.ParentID != nil {
parentSvc := buildSvc(*service.ParentID, req)
parents = append(parents, parentSvc)
parents = append(parents, parentSvc.Parents...)
}
return &Svc{
Service: service,