MCPcopy Create free account
hub / github.com/containerd/nerdctl / getTarget

Function getTarget

pkg/testutil/nerdtest/command.go:44–47  ·  view source on GitHub ↗

IMPORTANT note on file writing here: Inside the context of a single test, there is no concurrency, as setup, command and cleanup operate in sequence Furthermore, the tempdir is private by definition. Writing files here in a non-safe manner is thus OK.

()

Source from the content-addressed store, hash-verified

42// Writing files here in a non-safe manner is thus OK.
43
44func getTarget() string {
45 // Indirecting to testutil for now
46 return testutil.GetTarget()
47}
48
49func isTargetNerdish() bool {
50 return !strings.HasPrefix(filepath.Base(testutil.GetTarget()), "docker")

Callers 2

requirements.goFile · 0.85
newNerdCommandFunction · 0.85

Calls 1

GetTargetFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…