MCPcopy Index your code
hub / github.com/linuxkit/linuxkit / platformMessageGenerator

Function platformMessageGenerator

src/cmd/linuxkit/cache/platform.go:18–33  ·  view source on GitHub ↗
(platforms []imagespec.Platform)

Source from the content-addressed store, hash-verified

16}
17
18func platformMessageGenerator(platforms []imagespec.Platform) string {
19 var platformMessage string
20 switch {
21 case len(platforms) == 0:
22 platformMessage = "all platforms"
23 case len(platforms) == 1:
24 platformMessage = fmt.Sprintf("platform %s", platformString(platforms[0]))
25 default:
26 var platStrings []string
27 for _, p := range platforms {
28 platStrings = append(platStrings, platformString(p))
29 }
30 platformMessage = fmt.Sprintf("platforms %s", strings.Join(platStrings, ","))
31 }
32 return platformMessage
33}

Callers 2

ValidateImageMethod · 0.85
ImagePullMethod · 0.85

Calls 1

platformStringFunction · 0.85

Tested by

no test coverage detected