MCPcopy
hub / github.com/dagger/container-use / writeFile

Function writeFile

repository/git_test.go:176–182  ·  view source on GitHub ↗

Test helper functions

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

Source from the content-addressed store, hash-verified

174
175// Test helper functions
176func writeFile(t *testing.T, dir, name, content string) {
177 t.Helper()
178 path := filepath.Join(dir, name)
179 os.MkdirAll(filepath.Dir(path), 0755)
180 err := os.WriteFile(path, []byte(content), 0644)
181 require.NoError(t, err)
182}
183
184func writeBinaryFile(t *testing.T, dir, name string, size int) {
185 t.Helper()

Callers 2

TestSelectiveFileStagingFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected