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
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | 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
Name | Type | Default Value | Description |
---|---|---|---|
path | String ! | - | No description provided |
content | String ! | - | 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)
}