MCPcopy Index your code
hub / github.com/cloudfoundry/cli / tempFile

Function tempFile

command/flag/flag_suite_test.go:29–38  ·  view source on GitHub ↗
(data string)

Source from the content-addressed store, hash-verified

27})
28
29func tempFile(data string) string {
30 tempFile, err := os.CreateTemp(tempDir, "")
31 Expect(err).ToNot(HaveOccurred())
32 _, err = tempFile.WriteString(data)
33 Expect(err).ToNot(HaveOccurred())
34 err = tempFile.Close()
35 Expect(err).ToNot(HaveOccurred())
36
37 return tempFile.Name()
38}

Callers 2

path_test.goFile · 0.85

Calls 2

NameMethod · 0.80
CloseMethod · 0.65

Tested by

no test coverage detected