sourceUniqueIdentifier is used only for recursive cycle detection safety.
(src *pb.SourceOp, platform *ocispecs.Platform)
| 68 | |
| 69 | // sourceUniqueIdentifier is used only for recursive cycle detection safety. |
| 70 | func sourceUniqueIdentifier(src *pb.SourceOp, platform *ocispecs.Platform) string { |
| 71 | if src == nil { |
| 72 | return "" |
| 73 | } |
| 74 | key := src.Identifier |
| 75 | if platform != nil { |
| 76 | key += "|" + platforms.Format(*platform) |
| 77 | } |
| 78 | return key |
| 79 | } |
| 80 | |
| 81 | func firstNonNilPlatform(values ...*ocispecs.Platform) *ocispecs.Platform { |
| 82 | for _, v := range values { |
no test coverage detected
searching dependent graphs…