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

Function parseCacheMemoryRetentionDays

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

Source from the content-addressed store, hash-verified

182}
183
184func parseCacheMemoryRetentionDays(cacheMap map[string]any, entry *CacheMemoryEntry) error {
185 retentionDays, exists := cacheMap["retention-days"]
186 if !exists {
187 return nil
188 }
189 entry.RetentionDays = parseOptionalInt(retentionDays)
190 if entry.RetentionDays == nil {
191 return nil
192 }
193 return validateIntRange(*entry.RetentionDays, 1, 90, "retention-days")
194}
195
196// parseOptionalInt safely converts YAML numeric values (int, float64, uint64) to *int.
197//

Callers 1

parseCacheMemoryEntryFunction · 0.85

Calls 2

parseOptionalIntFunction · 0.85
validateIntRangeFunction · 0.85

Tested by

no test coverage detected