go
No long description provided.
Installation
dagger install github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62Entrypoint
Return Type
Go Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
func (m *MyModule) Example() *dagger.Go {
return dag.
Go()
}@function
def example() -> dagger.Go:
return (
dag.go()
)@func()
example(): Go {
return dag
.go()
}Types
Go 🔗
fromVersion() 🔗
Specify which version (image tag) of Go to use from the official image repository on Docker Hub.
Return Type
Base !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | StringKind ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
from-versionfunc (m *MyModule) Example(version ) {
return dag.
Go().
FromVersion(version)
}@function
def example(version: ) -> :
return (
dag.go()
.from_version(version)
)@func()
example(version: ): {
return dag
.go()
.fromVersion(version)
}fromImage() 🔗
Specify a custom image reference in “repository:tag” format.
Return Type
Base !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| image | StringKind ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
from-imagefunc (m *MyModule) Example(image ) {
return dag.
Go().
FromImage(image)
}@function
def example(image: ) -> :
return (
dag.go()
.from_image(image)
)@func()
example(image: ): {
return dag
.go()
.fromImage(image)
}fromContainer() 🔗
Specify a custom container.
Return Type
Base !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
from-containerfunc (m *MyModule) Example(ctr ) {
return dag.
Go().
FromContainer(ctr)
}@function
def example(ctr: ) -> :
return (
dag.go()
.from_container(ctr)
)@func()
example(ctr: ): {
return dag
.go()
.fromContainer(ctr)
}withEnvVariable() 🔗
Set an environment variable.
Return Type
Base !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | StringKind ! | - | No description provided |
| value | StringKind ! | - | No description provided |
| expand | BooleanKind | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
with-env-variablefunc (m *MyModule) Example(name , value ) {
return dag.
Go().
WithEnvVariable(name, value)
}@function
def example(name: , value: ) -> :
return (
dag.go()
.with_env_variable(name, value)
)@func()
example(name: , value: ): {
return dag
.go()
.withEnvVariable(name, value)
}withSource() 🔗
Mount a source directory. The container will use the latest official Go image.
Return Type
BaseWithSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
with-sourcefunc (m *MyModule) Example(src ) {
return dag.
Go().
WithSource(src)
}@function
def example(src: ) -> :
return (
dag.go()
.with_source(src)
)@func()
example(src: ): {
return dag
.go()
.withSource(src)
}exec() 🔗
Run a Go command in a container (default: latest official Go image with no mounted source).
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [StringKind ! ] ! | - | No description provided |
| version | StringKind | - | No description provided |
| image | StringKind | - | No description provided |
| container | Container | - | No description provided |
| source | Directory | - | No description provided |
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
execfunc (m *MyModule) Example(args ) {
return dag.
Go().
Exec(args)
}@function
def example(args: ) -> :
return (
dag.go()
.exec(args)
)@func()
example(args: ): {
return dag
.go()
.exec(args)
}container() 🔗
Return the default container.
Return Type
Container ! Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
containerfunc (m *MyModule) Example() {
return dag.
Go().
Container()
}@function
def example() -> :
return (
dag.go()
.container()
)@func()
example(): {
return dag
.go()
.container()
}Base 🔗
ctr() 🔗
Return Type
Container ! Example
Function GoBase.Ctr is not accessible from the go moduleFunction GoBase.Ctr is not accessible from the go moduleFunction GoBase.Ctr is not accessible from the go moduleFunction GoBase.Ctr is not accessible from the go modulecontainer() 🔗
Return the default container.
Return Type
Container ! Example
Function GoBase.container is not accessible from the go moduleFunction GoBase.container is not accessible from the go moduleFunction GoBase.container is not accessible from the go moduleFunction GoBase.container is not accessible from the go modulewithEnvVariable() 🔗
Set an environment variable.
Return Type
Base !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | StringKind ! | - | No description provided |
| value | StringKind ! | - | No description provided |
| expand | BooleanKind | - | No description provided |
Example
Function GoBase.withEnvVariable is not accessible from the go moduleFunction GoBase.withEnvVariable is not accessible from the go moduleFunction GoBase.withEnvVariable is not accessible from the go moduleFunction GoBase.withEnvVariable is not accessible from the go modulewithSource() 🔗
Mount a source directory. The container will use the latest official Go image.
Return Type
BaseWithSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
Example
Function GoBase.withSource is not accessible from the go moduleFunction GoBase.withSource is not accessible from the go moduleFunction GoBase.withSource is not accessible from the go moduleFunction GoBase.withSource is not accessible from the go moduleexec() 🔗
Run a Go command in a container (default: latest official Go image with no mounted source).
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [StringKind ! ] ! | - | No description provided |
| source | Directory | - | No description provided |
Example
Function GoBase.exec is not accessible from the go moduleFunction GoBase.exec is not accessible from the go moduleFunction GoBase.exec is not accessible from the go moduleFunction GoBase.exec is not accessible from the go moduleBaseWithSource 🔗
base() 🔗
Return Type
Base ! Example
Function GoBaseWithSource.Base is not accessible from the go moduleFunction GoBaseWithSource.Base is not accessible from the go moduleFunction GoBaseWithSource.Base is not accessible from the go moduleFunction GoBaseWithSource.Base is not accessible from the go modulecontainer() 🔗
Return the default container.
Return Type
Container ! Example
Function GoBaseWithSource.container is not accessible from the go moduleFunction GoBaseWithSource.container is not accessible from the go moduleFunction GoBaseWithSource.container is not accessible from the go moduleFunction GoBaseWithSource.container is not accessible from the go modulewithSource() 🔗
Mount a source directory. The container will use the latest official Go image.
Return Type
BaseWithSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| src | Directory ! | - | No description provided |
Example
Function GoBaseWithSource.withSource is not accessible from the go moduleFunction GoBaseWithSource.withSource is not accessible from the go moduleFunction GoBaseWithSource.withSource is not accessible from the go moduleFunction GoBaseWithSource.withSource is not accessible from the go modulewithEnvVariable() 🔗
Set an environment variable.
Return Type
BaseWithSource !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| name | StringKind ! | - | No description provided |
| value | StringKind ! | - | No description provided |
| expand | BooleanKind | - | No description provided |
Example
Function GoBaseWithSource.withEnvVariable is not accessible from the go moduleFunction GoBaseWithSource.withEnvVariable is not accessible from the go moduleFunction GoBaseWithSource.withEnvVariable is not accessible from the go moduleFunction GoBaseWithSource.withEnvVariable is not accessible from the go moduleexec() 🔗
Run a Go command in a container (default: latest official Go image with no mounted source).
Return Type
Container !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [StringKind ! ] ! | - | No description provided |
Example
Function GoBaseWithSource.exec is not accessible from the go moduleFunction GoBaseWithSource.exec is not accessible from the go moduleFunction GoBaseWithSource.exec is not accessible from the go moduleFunction GoBaseWithSource.exec is not accessible from the go module