(cache map[string]any, idx int, total int)
| 429 | } |
| 430 | |
| 431 | func resolveCacheStepName(cache map[string]any, idx int, total int) string { |
| 432 | stepName := "Cache" |
| 433 | if total > 1 { |
| 434 | stepName = fmt.Sprintf("Cache %d", idx+1) |
| 435 | } |
| 436 | if nameStr, ok := cache["name"].(string); ok && nameStr != "" { |
| 437 | return nameStr |
| 438 | } |
| 439 | if keyStr, ok := cache["key"].(string); ok && keyStr != "" { |
| 440 | return fmt.Sprintf("Cache (%s)", keyStr) |
| 441 | } |
| 442 | return stepName |
| 443 | } |
| 444 | |
| 445 | func writeCachePath(builder *strings.Builder, path any) { |
| 446 | if path == nil { |