go
No long description provided.
Installation
dagger install github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64bEntrypoint
Return Type
Go !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| source | Directory ! | - | Project source directory | 
| version | String | "1.23.1" | Go version | 
Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATHfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Go  {
	return dag.
			Go(source)
}@function
def example(source: dagger.Directory, ) -> dagger.Go:
	return (
		dag.go(source)
	)@func()
example(source: Directory, ): Go {
	return dag
		.go(source)
}Types
Go 🔗
A Go project
version() 🔗
Go version
Return Type
String !Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATH versionfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory) string  {
	return dag.
			Go(source).
			Version(ctx)
}@function
async def example(source: dagger.Directory, ) -> str:
	return await (
		dag.go(source)
		.version()
	)@func()
async example(source: Directory, ): Promise<string> {
	return dag
		.go(source)
		.version()
}source() 🔗
Project source directory
Return Type
Directory !Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATH sourcefunc (m *MyModule) Example(source *dagger.Directory) *dagger.Directory  {
	return dag.
			Go(source).
			Source()
}@function
def example(source: dagger.Directory, ) -> dagger.Directory:
	return (
		dag.go(source)
		.source()
	)@func()
example(source: Directory, ): Directory {
	return dag
		.go(source)
		.source()
}base() 🔗
Build a base container with Go installed and configured
Return Type
Container !Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATH basefunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container  {
	return dag.
			Go(source).
			Base()
}@function
def example(source: dagger.Directory, ) -> dagger.Container:
	return (
		dag.go(source)
		.base()
	)@func()
example(source: Directory, ): Container {
	return dag
		.go(source)
		.base()
}env() 🔗
Prepare a build environment for the given Go source code - Build a base container with Go tooling installed and configured - Mount the source code - Download dependencies
Return Type
Container !Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATH envfunc (m *MyModule) Example(source *dagger.Directory) *dagger.Container  {
	return dag.
			Go(source).
			Env()
}@function
def example(source: dagger.Directory, ) -> dagger.Container:
	return (
		dag.go(source)
		.env()
	)@func()
example(source: Directory, ): Container {
	return dag
		.go(source)
		.env()
}lint() 🔗
Lint the project
Return Type
Void !Arguments
| Name | Type | Default Value | Description | 
|---|---|---|---|
| packages | [String ! ] | - | No description provided | 
Example
dagger -m github.com/TomChv/dagger/modules/go@4cce43b582dd8576899468bf0cceb2abfb04d64b call \
 --source DIR_PATH lintfunc (m *MyModule) Example(ctx context.Context, source *dagger.Directory)   {
	return dag.
			Go(source).
			Lint(ctx)
}@function
async def example(source: dagger.Directory, ) -> None:
	return await (
		dag.go(source)
		.lint()
	)@func()
async example(source: Directory, ): Promise<void> {
	return dag
		.go(source)
		.lint()
}