GetReleasedAt retrieves the cached release date for the given repo and version. Returns the time and true if a release date is cached, otherwise zero time and false.
(repo, version string)
| 548 | // GetReleasedAt retrieves the cached release date for the given repo and version. |
| 549 | // Returns the time and true if a release date is cached, otherwise zero time and false. |
| 550 | func (c *ActionCache) GetReleasedAt(repo, version string) (time.Time, bool) { |
| 551 | key := formatActionCacheKey(repo, version) |
| 552 | entry, exists := c.Entries[key] |
| 553 | if !exists || entry.ReleasedAt == nil { |
| 554 | return time.Time{}, false |
| 555 | } |
| 556 | return *entry.ReleasedAt, true |
| 557 | } |
| 558 | |
| 559 | // SetReleasedAt stores the release publication date for the given repo and version. |
| 560 | // If no cache entry exists for the key, a new entry is created. |