MCPcopy
hub / github.com/nektos/act / setupPlatformVolume

Function setupPlatformVolume

pkg/container/docker_cli_test.go:338–350  ·  view source on GitHub ↗

setupPlatformVolume takes two arrays of volume specs - a Unix style spec and a Windows style spec. Depending on the platform being unit tested, it returns one of them, along with a volume string that would be passed on the docker CLI (e.g. -v /bar -v /foo).

(u []string, w []string)

Source from the content-addressed store, hash-verified

336// it returns one of them, along with a volume string that would be passed
337// on the docker CLI (e.g. -v /bar -v /foo).
338func setupPlatformVolume(u []string, w []string) ([]string, string) {
339 var a []string
340 if runtime.GOOS == "windows" {
341 a = w
342 } else {
343 a = u
344 }
345 s := ""
346 for _, v := range a {
347 s = s + "-v " + v + " "
348 }
349 return a, s
350}
351
352// check if (a == c && b == d) || (a == d && b == c)
353// because maps are randomized

Callers 1

TestParseWithVolumesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…