MCPcopy Create free account
hub / github.com/docker/buildx / sourceUniqueIdentifier

Function sourceUniqueIdentifier

policy/input.go:70–79  ·  view source on GitHub ↗

sourceUniqueIdentifier is used only for recursive cycle detection safety.

(src *pb.SourceOp, platform *ocispecs.Platform)

Source from the content-addressed store, hash-verified

68
69// sourceUniqueIdentifier is used only for recursive cycle detection safety.
70func 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
81func firstNonNilPlatform(values ...*ocispecs.Platform) *ocispecs.Platform {
82 for _, v := range values {

Callers 1

sourceToInputRecursiveFunction · 0.85

Calls 1

FormatMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…