修复stream中的错误
This commit is contained in:
parent
76a781d006
commit
61c10dab23
|
@ -1082,19 +1082,17 @@ func parseGoFile(filePath string) (ClientParams []*ClientParam) {
|
|||
} else if iface, ok := typeSpec.Type.(*ast.InterfaceType); ok {
|
||||
interfaceName := typeSpec.Name.Name
|
||||
|
||||
if len(iface.Methods.List) == 3 {
|
||||
if len(iface.Methods.List[0].Names) == 1 && len(iface.Methods.List[1].Names) == 1 {
|
||||
name0 := iface.Methods.List[0].Names[0].Name
|
||||
name1 := iface.Methods.List[1].Names[0].Name
|
||||
if name0 == "Send" && name1 == "CloseAndRecv" {
|
||||
// log.Println(name0, name1)
|
||||
if getTypeString(iface.Methods.List[2].Type) == "grpc.ClientStream" {
|
||||
// MethodType = "stream"
|
||||
// log.Println(interfaceName)
|
||||
if len(iface.Methods.List) >= 3 {
|
||||
if len(iface.Methods.List[2].Names) == 0 {
|
||||
|
||||
continue
|
||||
}
|
||||
// log.Println(name0, name1)
|
||||
if getTypeString(iface.Methods.List[2].Type) == "grpc.ClientStream" {
|
||||
// MethodType = "stream"
|
||||
// log.Println(interfaceName)
|
||||
|
||||
continue
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user