(buildCache []build.CacheRecord)
| 52 | } |
| 53 | |
| 54 | func buildCacheSort(buildCache []build.CacheRecord) { |
| 55 | sort.Slice(buildCache, func(i, j int) bool { |
| 56 | lui, luj := buildCache[i].LastUsedAt, buildCache[j].LastUsedAt |
| 57 | switch { |
| 58 | case lui == nil && luj == nil: |
| 59 | return strings.Compare(buildCache[i].ID, buildCache[j].ID) < 0 |
| 60 | case lui == nil: |
| 61 | return true |
| 62 | case luj == nil: |
| 63 | return false |
| 64 | case lui.Equal(*luj): |
| 65 | return strings.Compare(buildCache[i].ID, buildCache[j].ID) < 0 |
| 66 | default: |
| 67 | return lui.Before(*luj) |
| 68 | } |
| 69 | }) |
| 70 | } |
| 71 | |
| 72 | // BuildCacheWrite renders the context for a list of containers |
| 73 | func BuildCacheWrite(ctx Context, buildCaches []build.CacheRecord) error { |
no outgoing calls
no test coverage detected
searching dependent graphs…