golang
No long description provided.
Installation
dagger install github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7eEntrypoint
Return Type
Golang Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
func (m *MyModule) Example() *dagger.Golang {
return dag.
Golang()
}@function
def example() -> dagger.Golang:
return (
dag.golang()
)@func()
example(): Golang {
return dag
.golang()
}Types
Golang 🔗
ctr() 🔗
Return Type
Container ! Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
ctrfunc (m *MyModule) Example() {
return dag.
Golang().
Ctr()
}@function
def example() -> :
return (
dag.golang()
.ctr()
)@func()
example(): {
return dag
.golang()
.ctr()
}proj() 🔗
Return Type
Directory ! Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
projfunc (m *MyModule) Example() {
return dag.
Golang().
Proj()
}@function
def example() -> :
return (
dag.golang()
.proj()
)@func()
example(): {
return dag
.golang()
.proj()
}build() 🔗
Build the project
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [StringKind ! ] ! | - | No description provided |
| arch | StringKind | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
buildfunc (m *MyModule) Example(args ) {
return dag.
Golang().
Build(args)
}@function
def example(args: ) -> :
return (
dag.golang()
.build(args)
)@func()
example(args: ): {
return dag
.golang()
.build(args)
}test() 🔗
Test the project
Return Type
StringKind !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| args | [StringKind ! ] ! | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
testfunc (m *MyModule) Example(args ) {
return dag.
Golang().
Test(args)
}@function
def example(args: ) -> :
return (
dag.golang()
.test(args)
)@func()
example(args: ): {
return dag
.golang()
.test(args)
}golangciLint() 🔗
Lint the project
Return Type
StringKind ! Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
golangci-lintfunc (m *MyModule) Example() {
return dag.
Golang().
GolangciLint()
}@function
def example() -> :
return (
dag.golang()
.golangci_lint()
)@func()
example(): {
return dag
.golang()
.golangciLint()
}base() 🔗
Sets up the Container with a golang image and cache volumes
Return Type
Golang !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| version | StringKind ! | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
basefunc (m *MyModule) Example(version ) {
return dag.
Golang().
Base(version)
}@function
def example(version: ) -> :
return (
dag.golang()
.base(version)
)@func()
example(version: ): {
return dag
.golang()
.base(version)
}container() 🔗
Accessor for the Container
Return Type
Container ! Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
containerfunc (m *MyModule) Example() {
return dag.
Golang().
Container()
}@function
def example() -> :
return (
dag.golang()
.container()
)@func()
example(): {
return dag
.golang()
.container()
}project() 🔗
Accessor for the Project
Return Type
Directory ! Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
projectfunc (m *MyModule) Example() {
return dag.
Golang().
Project()
}@function
def example() -> :
return (
dag.golang()
.project()
)@func()
example(): {
return dag
.golang()
.project()
}withProject() 🔗
Specify the Project to use in the module
Return Type
Golang !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| dir | Directory ! | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
with-projectfunc (m *MyModule) Example(dir ) {
return dag.
Golang().
WithProject(dir)
}@function
def example(dir: ) -> :
return (
dag.golang()
.with_project(dir)
)@func()
example(dir: ): {
return dag
.golang()
.withProject(dir)
}withContainer() 🔗
Bring your own container
Return Type
Golang !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| ctr | Container ! | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
with-containerfunc (m *MyModule) Example(ctr ) {
return dag.
Golang().
WithContainer(ctr)
}@function
def example(ctr: ) -> :
return (
dag.golang()
.with_container(ctr)
)@func()
example(ctr: ): {
return dag
.golang()
.withContainer(ctr)
}buildRemote() 🔗
Return Type
Directory !Arguments
| Name | Type | Default Value | Description |
|---|---|---|---|
| remote | StringKind ! | - | No description provided |
| ref | StringKind ! | - | No description provided |
| module | StringKind ! | - | No description provided |
| arch | StringKind | - | No description provided |
| platform | StringKind | - | No description provided |
Example
dagger -m github.com/kpenfound/dagger-modules/golang@ec3133891c9cea4ec964c6fb597e62567dfecc7e call \
build-remotefunc (m *MyModule) Example(remote , ref , module ) {
return dag.
Golang().
BuildRemote(remote, ref, module)
}@function
def example(remote: , ref: , module: ) -> :
return (
dag.golang()
.build_remote(remote, ref, module)
)@func()
example(remote: , ref: , module: ): {
return dag
.golang()
.buildRemote(remote, ref, module)
}