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:
xgopilot
2025-10-31 02:28:17 +00:00
parent a3a7876d16
commit 022ba1c067

View File

@@ -396,10 +396,7 @@ func findMethod(mthds []abi.Method, im abi.Imethod) abi.Text {
}
func methods(u *abi.UncommonType, from string) []abi.Method {
if from == "" {
return u.Methods()
}
if u.PkgPath_ == from {
if from == "" || u.PkgPath_ == from {
return u.Methods()
}
return u.ExportedMethods()