MCPcopy Create free account
hub / github.com/diillson/chatcli / writeFile

Function writeFile

pkg/coder/engine/multipatch_test.go:34–39  ·  view source on GitHub ↗

writeFile is a small wrapper that fails the test on write errors.

(t *testing.T, dir, name, body string)

Source from the content-addressed store, hash-verified

32
33// writeFile is a small wrapper that fails the test on write errors.
34func writeFile(t *testing.T, dir, name, body string) string {
35 t.Helper()
36 path := filepath.Join(dir, name)
37 require.NoError(t, os.WriteFile(path, []byte(body), 0o644))
38 return path
39}
40
41// readFile returns the file's content or fails the test.
42func readFile(t *testing.T, path string) string {

Calls

no outgoing calls

Tested by

no test coverage detected