MCPcopy Create free account
hub / github.com/JordanCoin/codemap / mustWriteFile

Function mustWriteFile

cmd/context_test.go:44–52  ·  view source on GitHub ↗
(t *testing.T, path, content string)

Source from the content-addressed store, hash-verified

42}
43
44func mustWriteFile(t *testing.T, path, content string) {
45 t.Helper()
46 if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
47 t.Fatalf("mkdir %s: %v", path, err)
48 }
49 if err := os.WriteFile(path, []byte(content), 0o644); err != nil {
50 t.Fatalf("write %s: %v", path, err)
51 }
52}

Calls

no outgoing calls

Tested by

no test coverage detected