refactor(runtime): combine two if cases in methods() function
Simplified the methods() function in z_face.go by combining two if statements that both return u.Methods() into a single condition using logical OR operator. Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang <51194195+luoliwoshang@users.noreply.github.com>
This commit is contained in:
@@ -396,10 +396,7 @@ func findMethod(mthds []abi.Method, im abi.Imethod) abi.Text {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func methods(u *abi.UncommonType, from string) []abi.Method {
|
func methods(u *abi.UncommonType, from string) []abi.Method {
|
||||||
if from == "" {
|
if from == "" || u.PkgPath_ == from {
|
||||||
return u.Methods()
|
|
||||||
}
|
|
||||||
if u.PkgPath_ == from {
|
|
||||||
return u.Methods()
|
return u.Methods()
|
||||||
}
|
}
|
||||||
return u.ExportedMethods()
|
return u.ExportedMethods()
|
||||||
|
|||||||
Reference in New Issue
Block a user