MCPcopy
hub / github.com/docker/compose / mustWrite

Function mustWrite

cmd/compose/hooks_test.go:322–327  ·  view source on GitHub ↗
(t *testing.T, dir, name, content string)

Source from the content-addressed store, hash-verified

320}
321
322func mustWrite(t *testing.T, dir, name, content string) {
323 t.Helper()
324 if err := os.WriteFile(filepath.Join(dir, name), []byte(content), 0o644); err != nil {
325 t.Fatalf("write %s: %v", name, err)
326 }
327}
328
329func marshalHookData(t *testing.T, data hooks.Request) string {
330 t.Helper()

Calls 1

WriteFileMethod · 0.80

Tested by

no test coverage detected