MCPcopy Create free account
hub / github.com/dagger/dagger / fileContents

Function fileContents

core/integration/module_test.go:8122–8126  ·  view source on GitHub ↗

fileContents is syntax sugar for Container.WithNewFile.

(path, contents string)

Source from the content-addressed store, hash-verified

8120
8121// fileContents is syntax sugar for Container.WithNewFile.
8122func fileContents(path, contents string) dagger.WithContainerFunc {
8123 return func(c *dagger.Container) *dagger.Container {
8124 return c.WithNewFile(path, heredoc.Doc(contents))
8125 }
8126}
8127
8128func withModuleFixture(t testing.TB, c *dagger.Client, dst, fixture string) dagger.WithContainerFunc {
8129 t.Helper()

Callers 13

TestInitMethod · 0.85
TestProjectLayoutMethod · 0.85
TestVersionMethod · 0.85
TestASTFollowUpMethod · 0.85
TestErrorsMethod · 0.85
pythonSourceAtFunction · 0.85
pyprojectExtraFunction · 0.85
configFileFunction · 0.85
sdkSourceFunction · 0.85

Calls 2

WithNewFileMethod · 0.45
DocMethod · 0.45

Tested by

no test coverage detected