MCPcopy
hub / github.com/google/gvisor / NewRunner

Function NewRunner

tools/nvidia_driver_differ/parser/runner.go:41–52  ·  view source on GitHub ↗

NewRunner creates a new Runner around a given parser file and a temporary working directory.

(parserPath string)

Source from the content-addressed store, hash-verified

39
40// NewRunner creates a new Runner around a given parser file and a temporary working directory.
41func NewRunner(parserPath string) (*Runner, error) {
42 // Create a temp directory for the runner.
43 dir, err := os.MkdirTemp(os.TempDir(), "run_differ_*")
44 if err != nil {
45 return nil, fmt.Errorf("failed to create temporary directory: %w", err)
46 }
47
48 return &Runner{
49 dir: dir,
50 parserPath: parserPath,
51 }, nil
52}
53
54// Cleanup removes the working directory for the runner.
55func (r *Runner) Cleanup() error {

Callers 2

MainFunction · 0.92
createParserRunnerFunction · 0.92

Calls 1

ErrorfMethod · 0.65

Tested by 1

createParserRunnerFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…