path:=fmt.Sprintf("6,%d",index)// 6 means service.
origServName:=service.GetName()
fullServName:=origServName
ifpkg:=file.GetPackage();pkg!=""{
fullServName=pkg+"."+fullServName
}
servName:=generator.CamelCase(origServName)
deprecated:=service.GetOptions().GetDeprecated()
g.P()
g.P(fmt.Sprintf(`// %sClientImpl is the client API for %s service.
path:=fmt.Sprintf("6,%d",index)// 6 means service.
origServName:=service.GetName()
fullServName:=origServName
ifpkg:=file.GetPackage();pkg!=""{
fullServName=pkg+"."+fullServName
}
servName:=generator.CamelCase(origServName)
deprecated:=service.GetOptions().GetDeprecated()
g.P()
g.P(fmt.Sprintf(`// %sClientImpl is the client API for %s service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.`,servName,servName))
// Client interface.
ifdeprecated{
g.P("//")
g.P(deprecationComment)
}
dubboSrvName:=servName+"ClientImpl"
g.P("type ",dubboSrvName," struct {")
fori,method:=rangeservice.Method{
g.gen.PrintComments(fmt.Sprintf("%s,2,%d",path,i))// 2 means method in a service.