go-orb
This module has been generated via dagger init and serves as a reference tobasic module structure as you get started with Dagger.
Two functions have been pre-created. You can modify, delete, or add to them,
as needed. They demonstrate usage of arguments and return types using simple
echo and grep commands. The functions can be called from the dagger CLI or
from one of the SDKs.
The first line in this comment block is a short description line and the
rest is a long description with more detail on the module's purpose or usage,
if appropriate. All modules should have a short description.
Installation
dagger install github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe
Entrypoint
Return Type
GoOrb
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
func (m *myModule) example() *GoOrb {
return dag.
GoOrb()
}
@function
def example() -> dag.GoOrb:
return (
dag.go_orb()
)
@func()
example(): GoOrb {
return dag
.goOrb()
}
Types
GoOrb 🔗
modules() 🔗
Returns all modules in root
Return Type
[String ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
root | Directory ! | - | No description provided |
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
modules --root DIR_PATH
func (m *myModule) example(ctx context.Context, root *Directory) []string {
return dag.
GoOrb().
Modules(ctx, root)
}
@function
async def example(root: dagger.Directory) -> List[str]:
return await (
dag.go_orb()
.modules(root)
)
@func()
async example(root: Directory): Promise<string[]> {
return dag
.goOrb()
.modules(root)
}
lint() 🔗
Lints all modules starting from root
with golangci-lint
Return Type
GoOrbAllResult !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
root | Directory ! | - | No description provided |
golangciConfig | File | - | No description provided |
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
lint --root DIR_PATH
func (m *myModule) example(root *Directory) *GoOrbAllResult {
return dag.
GoOrb().
Lint(root)
}
@function
def example(root: dagger.Directory) -> dag.GoOrbAllResult:
return (
dag.go_orb()
.lint(root)
)
@func()
example(root: Directory): GoOrbAllResult {
return dag
.goOrb()
.lint(root)
}
test() 🔗
Tests all modules starting from root
with go test ./... -v -race -cover
Return Type
GoOrbAllResult !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
root | Directory ! | - | No description provided |
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
test --root DIR_PATH
func (m *myModule) example(root *Directory) *GoOrbAllResult {
return dag.
GoOrb().
Test(root)
}
@function
def example(root: dagger.Directory) -> dag.GoOrbAllResult:
return (
dag.go_orb()
.test(root)
)
@func()
example(root: Directory): GoOrbAllResult {
return dag
.goOrb()
.test(root)
}
tidy() 🔗
Runs go mod tidy -go=1.23.6
in all modules starting with root
Return Type
GoOrbAllResult !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
root | Directory ! | - | No description provided |
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
tidy --root DIR_PATH
func (m *myModule) example(root *Directory) *GoOrbAllResult {
return dag.
GoOrb().
Tidy(root)
}
@function
def example(root: dagger.Directory) -> dag.GoOrbAllResult:
return (
dag.go_orb()
.tidy(root)
)
@func()
example(root: Directory): GoOrbAllResult {
return dag
.goOrb()
.tidy(root)
}
update() 🔗
Runs go get -u -t ./...
in all modules starting with root
Return Type
GoOrbAllResult !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
root | Directory ! | - | No description provided |
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
update --root DIR_PATH
func (m *myModule) example(root *Directory) *GoOrbAllResult {
return dag.
GoOrb().
Update(root)
}
@function
def example(root: dagger.Directory) -> dag.GoOrbAllResult:
return (
dag.go_orb()
.update(root)
)
@func()
example(root: Directory): GoOrbAllResult {
return dag
.goOrb()
.update(root)
}
GoOrbAllResult 🔗
logs() 🔗
Return Type
[String ! ] !
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
update --root DIR_PATH \
logs
func (m *myModule) example(ctx context.Context, root *Directory) []string {
return dag.
GoOrb().
Update(root).
Logs(ctx)
}
@function
async def example(root: dagger.Directory) -> List[str]:
return await (
dag.go_orb()
.update(root)
.logs()
)
@func()
async example(root: Directory): Promise<string[]> {
return dag
.goOrb()
.update(root)
.logs()
}
source() 🔗
Return Type
Directory !
Example
dagger -m github.com/go-orb/plugins@0c27f776c6598d4ab99a9a208989ad1a32216abe call \
update --root DIR_PATH \
source
func (m *myModule) example(root *Directory) *Directory {
return dag.
GoOrb().
Update(root).
Source()
}
@function
def example(root: dagger.Directory) -> dagger.Directory:
return (
dag.go_orb()
.update(root)
.source()
)
@func()
example(root: Directory): Directory {
return dag
.goOrb()
.update(root)
.source()
}