(funcName string, o *OverloadDecl)
| 1296 | } |
| 1297 | |
| 1298 | func formatCall(funcName string, o *OverloadDecl) string { |
| 1299 | args := make([]string, len(o.ArgTypes())) |
| 1300 | ret := describeCELType(o.ResultType()) |
| 1301 | for j, a := range o.ArgTypes() { |
| 1302 | args[j] = describeCELType(a) |
| 1303 | } |
| 1304 | if o.IsMemberFunction() { |
| 1305 | target := args[0] |
| 1306 | args = args[1:] |
| 1307 | return fmt.Sprintf("%s.%s(%s) -> %s", target, funcName, strings.Join(args, ", "), ret) |
| 1308 | } |
| 1309 | return fmt.Sprintf("%s(%s) -> %s", funcName, strings.Join(args, ", "), ret) |
| 1310 | } |
| 1311 | |
| 1312 | func describeCELType(t *types.Type) string { |
| 1313 | if t.Kind() == types.TypeKind { |
no test coverage detected