MCPcopy Create free account
hub / github.com/github/gh-aw / resolveCacheStepName

Function resolveCacheStepName

pkg/workflow/cache.go:431–443  ·  view source on GitHub ↗
(cache map[string]any, idx int, total int)

Source from the content-addressed store, hash-verified

429}
430
431func 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
445func writeCachePath(builder *strings.Builder, path any) {
446 if path == nil {

Callers 1

writeCacheStepFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected