Dagger
Search

go

No long description provided.

Installation

dagger install github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62

Entrypoint

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
NameTypeDefault ValueDescription
versionStringKind !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 from-version
func (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
NameTypeDefault ValueDescription
imageStringKind !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 from-image
func (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
NameTypeDefault ValueDescription
ctrContainer !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 from-container
func (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
NameTypeDefault ValueDescription
nameStringKind !-No description provided
valueStringKind !-No description provided
expandBooleanKind -No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 with-env-variable
func (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
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 with-source
func (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
NameTypeDefault ValueDescription
args[StringKind ! ] !-No description provided
versionStringKind -No description provided
imageStringKind -No description provided
containerContainer -No description provided
sourceDirectory -No description provided
Example
dagger -m github.com/sagikazarmark/daggerverse/go@d5da86877cae930fa6a6e2e6377cea565e5e0c62 call \
 exec
func (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 \
 container
func (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 module
Function GoBase.Ctr is not accessible from the go module
Function GoBase.Ctr is not accessible from the go module
Function GoBase.Ctr is not accessible from the go module

container() 🔗

Return the default container.

Return Type
Container !
Example
Function GoBase.container is not accessible from the go module
Function GoBase.container is not accessible from the go module
Function GoBase.container is not accessible from the go module
Function GoBase.container is not accessible from the go module

withEnvVariable() 🔗

Set an environment variable.

Return Type
Base !
Arguments
NameTypeDefault ValueDescription
nameStringKind !-No description provided
valueStringKind !-No description provided
expandBooleanKind -No description provided
Example
Function GoBase.withEnvVariable is not accessible from the go module
Function GoBase.withEnvVariable is not accessible from the go module
Function GoBase.withEnvVariable is not accessible from the go module
Function GoBase.withEnvVariable is not accessible from the go module

withSource() 🔗

Mount a source directory. The container will use the latest official Go image.

Return Type
BaseWithSource !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
Function GoBase.withSource is not accessible from the go module
Function GoBase.withSource is not accessible from the go module
Function GoBase.withSource is not accessible from the go module
Function GoBase.withSource is not accessible from the go module

exec() 🔗

Run a Go command in a container (default: latest official Go image with no mounted source).

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
args[StringKind ! ] !-No description provided
sourceDirectory -No description provided
Example
Function GoBase.exec is not accessible from the go module
Function GoBase.exec is not accessible from the go module
Function GoBase.exec is not accessible from the go module
Function GoBase.exec is not accessible from the go module

BaseWithSource 🔗

base() 🔗

Return Type
Base !
Example
Function GoBaseWithSource.Base is not accessible from the go module
Function GoBaseWithSource.Base is not accessible from the go module
Function GoBaseWithSource.Base is not accessible from the go module
Function GoBaseWithSource.Base is not accessible from the go module

container() 🔗

Return the default container.

Return Type
Container !
Example
Function GoBaseWithSource.container is not accessible from the go module
Function GoBaseWithSource.container is not accessible from the go module
Function GoBaseWithSource.container is not accessible from the go module
Function GoBaseWithSource.container is not accessible from the go module

withSource() 🔗

Mount a source directory. The container will use the latest official Go image.

Return Type
BaseWithSource !
Arguments
NameTypeDefault ValueDescription
srcDirectory !-No description provided
Example
Function GoBaseWithSource.withSource is not accessible from the go module
Function GoBaseWithSource.withSource is not accessible from the go module
Function GoBaseWithSource.withSource is not accessible from the go module
Function GoBaseWithSource.withSource is not accessible from the go module

withEnvVariable() 🔗

Set an environment variable.

Return Type
BaseWithSource !
Arguments
NameTypeDefault ValueDescription
nameStringKind !-No description provided
valueStringKind !-No description provided
expandBooleanKind -No description provided
Example
Function GoBaseWithSource.withEnvVariable is not accessible from the go module
Function GoBaseWithSource.withEnvVariable is not accessible from the go module
Function GoBaseWithSource.withEnvVariable is not accessible from the go module
Function GoBaseWithSource.withEnvVariable is not accessible from the go module

exec() 🔗

Run a Go command in a container (default: latest official Go image with no mounted source).

Return Type
Container !
Arguments
NameTypeDefault ValueDescription
args[StringKind ! ] !-No description provided
Example
Function GoBaseWithSource.exec is not accessible from the go module
Function GoBaseWithSource.exec is not accessible from the go module
Function GoBaseWithSource.exec is not accessible from the go module
Function GoBaseWithSource.exec is not accessible from the go module