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

Function parseCacheMemoryScope

pkg/workflow/cache.go:246–257  ·  view source on GitHub ↗
(cacheMap map[string]any, entry *CacheMemoryEntry)

Source from the content-addressed store, hash-verified

244}
245
246func parseCacheMemoryScope(cacheMap map[string]any, entry *CacheMemoryEntry) error {
247 if scopeStr, ok := cacheMap["scope"].(string); ok {
248 entry.Scope = scopeStr
249 }
250 if entry.Scope == "" {
251 entry.Scope = "workflow"
252 }
253 if slices.Contains(validCacheMemoryScopes, entry.Scope) {
254 return nil
255 }
256 return fmt.Errorf("invalid cache-memory scope %q: must be one of %v", entry.Scope, validCacheMemoryScopes)
257}
258
259func parseCacheMemoryAllowedExtensions(cacheMap map[string]any, entry *CacheMemoryEntry) error {
260 allowedExts, exists := cacheMap["allowed-extensions"]

Callers 1

parseCacheMemoryEntryFunction · 0.85

Calls 1

ErrorfMethod · 0.45

Tested by

no test coverage detected