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

Function initStandaloneDangModule

core/integration/workspace_test.go:51–57  ·  view source on GitHub ↗

initStandaloneDangModule creates a standalone Dang module in the current working directory and overwrites main.dang with the provided source.

(name, source string)

Source from the content-addressed store, hash-verified

49// initStandaloneDangModule creates a standalone Dang module in the current
50// working directory and overwrites main.dang with the provided source.
51func initStandaloneDangModule(name, source string) dagger.WithContainerFunc {
52 return func(ctr *dagger.Container) *dagger.Container {
53 return ctr.
54 With(daggerExec("init", "--sdk=dang", "--source=.", "--name="+name)).
55 WithNewFile("main.dang", source)
56 }
57}
58
59// initDangBlueprint creates a Dang blueprint module and an app module that
60// uses it. The blueprint source is written to blueprints/<name>/ and the app

Calls 3

daggerExecFunction · 0.85
WithNewFileMethod · 0.45
WithMethod · 0.45

Tested by

no test coverage detected