Dagger
Search

toy-workspace

No long description provided.

Installation

dagger install github.com/dagger/agents/toy-programmer/toy-workspace@b4e802499435d5320c06a1d7590ce7382847a8ef

Entrypoint

Return Type
ToyWorkspace !
Example
func (m *myModule) example() *ToyWorkspace  {
	return dag.
			ToyWorkspace()
}

Types

ToyWorkspace ๐Ÿ”—

A toy workspace that can edit files and run 'go build'

container() ๐Ÿ”—

The workspaceโ€™s container state.

Return Type
Container !
Example
func (m *myModule) example() *Container  {
	return dag.
			ToyWorkspace().
			Container()
}

read() ๐Ÿ”—

Read a file

Return Type
String !
Arguments
NameTypeDefault ValueDescription
pathString !-No description provided
Example
func (m *myModule) example(ctx context.Context, path string) string  {
	return dag.
			ToyWorkspace().
			Read(ctx, path)
}

write() ๐Ÿ”—

Write a file

Return Type
ToyWorkspace !
Arguments
NameTypeDefault ValueDescription
pathString !-No description provided
contentString !-No description provided
Example
func (m *myModule) example(path string, content string) *ToyWorkspace  {
	return dag.
			ToyWorkspace().
			Write(path, content)
}

build() ๐Ÿ”—

Build the code at the current directory in the workspace

Return Type
Void !
Example
func (m *myModule) example(ctx context.Context)   {
	return dag.
			ToyWorkspace().
			Build(ctx)
}