go
This software is released under the MIT License.https://opensource.org/licenses/MIT
Installation
dagger install github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae
Entrypoint
Return Type
Go !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | String ! | "alpine" | Alpine default does not come with gcc so cgo in unsupported by default. |
from | Container | - | No description provided |
buildCache | CacheVolume | - | No description provided |
moduleCache | CacheVolume | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
--version string
func (m *MyModule) Example(version string) *dagger.Go {
return dag.
Go(version)
}
@function
def example(version: str, ) -> dagger.Go:
return (
dag.go(version)
)
@func()
example(version: string, ): Go {
return dag
.go(version)
}
Types
Go 🔗
Go
container() 🔗
Base container configured for working with Go.
Return Type
Container !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
--version string container
func (m *MyModule) Example(version string) *dagger.Container {
return dag.
Go(version).
Container()
}
@function
def example(version: str, ) -> dagger.Container:
return (
dag.go(version)
.container()
)
@func()
example(version: string, ): Container {
return dag
.go(version)
.container()
}
module() 🔗
Mount a directory containing a Go module.
Return Type
Mod !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
source | Directory ! | - | No description provided |
path | String ! | "." | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
--version string module --source DIR_PATH --path string
func (m *MyModule) Example(version string, source *dagger.Directory, path string) *dagger.GoMod {
return dag.
Go(version).
Module(source, path)
}
@function
def example(version: str, source: dagger.Directory, path: str) -> dagger.GoMod:
return (
dag.go(version)
.module(source, path)
)
@func()
example(version: string, source: Directory, path: string): GoMod {
return dag
.go(version)
.module(source, path)
}
Mod 🔗
build() 🔗
Build a Go module.
Return Type
Build !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pkg | String ! | - | No description provided |
race | Boolean | - | No description provided |
ldflags | [String ! ] | - | No description provided |
tags | [String ! ] | - | No description provided |
trimpath | Boolean | - | No description provided |
enableCgo | Boolean | - | No description provided |
platform | Scalar | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
build --pkg string
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string) *dagger.GoBuild {
return dag.
Go().
Module(source, path).
Build(pkg)
}
@function
def example(source: dagger.Directory, path: str, pkg: str) -> dagger.GoBuild:
return (
dag.go()
.module(source, path)
.build(pkg)
)
@func()
example(source: Directory, path: string, pkg: string): GoBuild {
return dag
.go()
.module(source, path)
.build(pkg)
}
test() 🔗
Run tests within a Go module.
Return Type
Test !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pkg | String ! | - | No description provided |
race | Boolean | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
test --pkg string
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string) *dagger.GoTest {
return dag.
Go().
Module(source, path).
Test(pkg)
}
@function
def example(source: dagger.Directory, path: str, pkg: str) -> dagger.GoTest:
return (
dag.go()
.module(source, path)
.test(pkg)
)
@func()
example(source: Directory, path: string, pkg: string): GoTest {
return dag
.go()
.module(source, path)
.test(pkg)
}
tidy() 🔗
Ensure go.mod matches the source code in the module.
Return Type
Tidy !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
tidy
func (m *MyModule) Example(source *dagger.Directory, path string) *dagger.GoTidy {
return dag.
Go().
Module(source, path).
Tidy()
}
@function
def example(source: dagger.Directory, path: str) -> dagger.GoTidy:
return (
dag.go()
.module(source, path)
.tidy()
)
@func()
example(source: Directory, path: string): GoTidy {
return dag
.go()
.module(source, path)
.tidy()
}
generate() 🔗
Run commands described by directives within existing files.
Return Type
Generate !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pkg | String ! | - | Package path to search for directives within. |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
generate --pkg string
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string) *dagger.GoGenerate {
return dag.
Go().
Module(source, path).
Generate(pkg)
}
@function
def example(source: dagger.Directory, path: str, pkg: str) -> dagger.GoGenerate:
return (
dag.go()
.module(source, path)
.generate(pkg)
)
@func()
example(source: Directory, path: string, pkg: string): GoGenerate {
return dag
.go()
.module(source, path)
.generate(pkg)
}
library() 🔗
A set of functions for working with a library written in Go.
Return Type
Library !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
linter | Interface | - | No description provided |
staticAnalyzer | Interface | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library
func (m *MyModule) Example(source *dagger.Directory, path string) *dagger.GoLibrary {
return dag.
Go().
Module(source, path).
Library()
}
@function
def example(source: dagger.Directory, path: str) -> dagger.GoLibrary:
return (
dag.go()
.module(source, path)
.library()
)
@func()
example(source: Directory, path: string): GoLibrary {
return dag
.go()
.module(source, path)
.library()
}
Build 🔗
output() 🔗
Retrieve the compiled binary.
Return Type
File !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
build --pkg string \
output
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string) *dagger.File {
return dag.
Go().
Module(source, path).
Build(pkg).
Output()
}
@function
def example(source: dagger.Directory, path: str, pkg: str) -> dagger.File:
return (
dag.go()
.module(source, path)
.build(pkg)
.output()
)
@func()
example(source: Directory, path: string, pkg: string): File {
return dag
.go()
.module(source, path)
.build(pkg)
.output()
}
Test 🔗
coverage() 🔗
Retrieve a coverage profile from running the tests.
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
mode | Enum ! | "SET" | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
test --pkg string \
coverage
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string, mode ) *dagger.File {
return dag.
Go().
Module(source, path).
Test(pkg).
Coverage(mode)
}
@function
def example(source: dagger.Directory, path: str, pkg: str, mode: ) -> dagger.File:
return (
dag.go()
.module(source, path)
.test(pkg)
.coverage(mode)
)
@func()
example(source: Directory, path: string, pkg: string, mode: ): File {
return dag
.go()
.module(source, path)
.test(pkg)
.coverage(mode)
}
Tidy 🔗
Tidy
report() 🔗
Apply neccessary changes for go.mod or go.sum and report changes made.
Return Type
[String ! ] !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
tidy \
report
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string) []string {
return dag.
Go().
Module(source, path).
Tidy().
Report(ctx)
}
@function
async def example(source: dagger.Directory, path: str) -> List[str]:
return await (
dag.go()
.module(source, path)
.tidy()
.report()
)
@func()
async example(source: Directory, path: string): Promise<string[]> {
return dag
.go()
.module(source, path)
.tidy()
.report()
}
diff() 🔗
Only report necessary changes for go.mod or go.sum.
Return Type
[String ! ] !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
tidy \
diff
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string) []string {
return dag.
Go().
Module(source, path).
Tidy().
Diff(ctx)
}
@function
async def example(source: dagger.Directory, path: str) -> List[str]:
return await (
dag.go()
.module(source, path)
.tidy()
.diff()
)
@func()
async example(source: Directory, path: string): Promise<string[]> {
return dag
.go()
.module(source, path)
.tidy()
.diff()
}
Generate 🔗
report() 🔗
Return all generate directives ran.
Return Type
[String ! ] !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
generate --pkg string \
report
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, pkg string) []string {
return dag.
Go().
Module(source, path).
Generate(pkg).
Report(ctx)
}
@function
async def example(source: dagger.Directory, path: str, pkg: str) -> List[str]:
return await (
dag.go()
.module(source, path)
.generate(pkg)
.report()
)
@func()
async example(source: Directory, path: string, pkg: string): Promise<string[]> {
return dag
.go()
.module(source, path)
.generate(pkg)
.report()
}
diff() 🔗
Validate no change to the filesystem after running all generate directives.
Return Type
[String ! ] !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
generate --pkg string \
diff
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, pkg string) []string {
return dag.
Go().
Module(source, path).
Generate(pkg).
Diff(ctx)
}
@function
async def example(source: dagger.Directory, path: str, pkg: str) -> List[str]:
return await (
dag.go()
.module(source, path)
.generate(pkg)
.diff()
)
@func()
async example(source: Directory, path: string, pkg: string): Promise<string[]> {
return dag
.go()
.module(source, path)
.generate(pkg)
.diff()
}
dryRun() 🔗
Return all generate directives which would be ran.
Return Type
[String ! ] !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
generate --pkg string \
dry-run
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, pkg string) []string {
return dag.
Go().
Module(source, path).
Generate(pkg).
DryRun(ctx)
}
@function
async def example(source: dagger.Directory, path: str, pkg: str) -> List[str]:
return await (
dag.go()
.module(source, path)
.generate(pkg)
.dry_run()
)
@func()
async example(source: Directory, path: string, pkg: string): Promise<string[]> {
return dag
.go()
.module(source, path)
.generate(pkg)
.dryRun()
}
Library 🔗
application() 🔗
A set of functions for working with a application written in Go.
Return Type
Application !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
mainPackagePath | String ! | - | Path to package main for the application. |
containerScanner | Interface | - | Specify a tool for scanning built application container before publishing. |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string
func (m *MyModule) Example(source *dagger.Directory, path string, mainPackagePath string) *dagger.GoApplication {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath)
}
@function
def example(source: dagger.Directory, path: str, main_package_path: str) -> dagger.GoApplication:
return (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
)
@func()
example(source: Directory, path: string, mainPackagePath: string): GoApplication {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
}
ci() 🔗
Run all continuous integration functions.
Return Type
Void !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
ci
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string) {
return dag.
Go().
Module(source, path).
Library().
Ci(ctx)
}
@function
async def example(source: dagger.Directory, path: str) -> None:
return await (
dag.go()
.module(source, path)
.library()
.ci()
)
@func()
async example(source: Directory, path: string): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.ci()
}
generate() 🔗
Run generate directives and validate no filesystem changes.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pkg | String ! | "./..." | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
generate --pkg string
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, pkg string) {
return dag.
Go().
Module(source, path).
Library().
Generate(ctx, pkg)
}
@function
async def example(source: dagger.Directory, path: str, pkg: str) -> None:
return await (
dag.go()
.module(source, path)
.library()
.generate(pkg)
)
@func()
async example(source: Directory, path: string, pkg: string): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.generate(pkg)
}
tidy() 🔗
Validate no necessary changes for go.mod or go.sum.
Return Type
Void !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
tidy
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string) {
return dag.
Go().
Module(source, path).
Library().
Tidy(ctx)
}
@function
async def example(source: dagger.Directory, path: str) -> None:
return await (
dag.go()
.module(source, path)
.library()
.tidy()
)
@func()
async example(source: Directory, path: string): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.tidy()
}
lint() 🔗
Lint source code.
Return Type
File !
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
lint
func (m *MyModule) Example(source *dagger.Directory, path string) *dagger.File {
return dag.
Go().
Module(source, path).
Library().
Lint()
}
@function
def example(source: dagger.Directory, path: str) -> dagger.File:
return (
dag.go()
.module(source, path)
.library()
.lint()
)
@func()
example(source: Directory, path: string): File {
return dag
.go()
.module(source, path)
.library()
.lint()
}
test() 🔗
Run tests and return coverage report.
Return Type
File !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
pkg | String ! | "./..." | No description provided |
race | Boolean ! | true | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
test --pkg string --race boolean
func (m *MyModule) Example(source *dagger.Directory, path string, pkg string, race bool) *dagger.File {
return dag.
Go().
Module(source, path).
Library().
Test(pkg, race)
}
@function
def example(source: dagger.Directory, path: str, pkg: str, race: bool) -> dagger.File:
return (
dag.go()
.module(source, path)
.library()
.test(pkg, race)
)
@func()
example(source: Directory, path: string, pkg: string, race: boolean): File {
return dag
.go()
.module(source, path)
.library()
.test(pkg, race)
}
staticAnalysis() 🔗
Perform static analysis.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
lintReport | File ! | - | No description provided |
coverageReport | File ! | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
static-analysis --lint-report file:path --coverage-report file:path
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, lintReport *dagger.File, coverageReport *dagger.File) {
return dag.
Go().
Module(source, path).
Library().
StaticAnalysis(ctx, lintReport, coverageReport)
}
@function
async def example(source: dagger.Directory, path: str, lint_report: dagger.File, coverage_report: dagger.File) -> None:
return await (
dag.go()
.module(source, path)
.library()
.static_analysis(lint_report, coverage_report)
)
@func()
async example(source: Directory, path: string, lintReport: File, coverageReport: File): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.staticAnalysis(lintReport, coverageReport)
}
Application 🔗
ci() 🔗
Run all continuous integration functions.
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
imageRegistry | String ! | - | No description provided |
imageName | String ! | - | No description provided |
imageTags | [String ! ] ! | - | No description provided |
registryUsername | String ! | - | No description provided |
registrySecret | Secret ! | - | No description provided |
ldflags | [String ! ] ! | ["-s","-w"] | No description provided |
buildTags | [String ! ] | - | No description provided |
trimpath | Boolean ! | true | No description provided |
enableCgo | Boolean | - | No description provided |
platforms | [Scalar ! ] ! | ["linux/amd64","linux/arm64"] | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string \
ci --image-registry string --image-name string --image-tags string1 --image-tags string2 --registry-username string --registry-secret env:MYSECRET --ldflags string1 --ldflags string2 --trimpath boolean
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, mainPackagePath string, imageRegistry string, imageName string, imageTags []string, registryUsername string, registrySecret *dagger.Secret, ldflags []string, trimpath bool, platforms []) {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath).
Ci(ctx, imageRegistry, imageName, imageTags, registryUsername, registrySecret, ldflags, trimpath, platforms)
}
@function
async def example(source: dagger.Directory, path: str, main_package_path: str, image_registry: str, image_name: str, image_tags: List[str], registry_username: str, registry_secret: dagger.Secret, ldflags: List[str], trimpath: bool, platforms: List[]) -> None:
return await (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
.ci(image_registry, image_name, image_tags, registry_username, registry_secret, ldflags, trimpath, platforms)
)
@func()
async example(source: Directory, path: string, mainPackagePath: string, imageRegistry: string, imageName: string, imageTags: string[], registryUsername: string, registrySecret: Secret, ldflags: string[], trimpath: boolean, platforms: []): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
.ci(imageRegistry, imageName, imageTags, registryUsername, registrySecret, ldflags, trimpath, platforms)
}
build() 🔗
Produce container image(s) for application.
Return Type
[Container ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ldflags | [String ! ] ! | ["-s","-w"] | No description provided |
tags | [String ! ] | - | No description provided |
trimpath | Boolean ! | true | No description provided |
enableCgo | Boolean | - | No description provided |
platforms | [Scalar ! ] ! | ["linux/amd64","linux/arm64"] | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string \
build --ldflags string1 --ldflags string2 --trimpath boolean
func (m *MyModule) Example(source *dagger.Directory, path string, mainPackagePath string, ldflags []string, trimpath bool, platforms []) []*dagger.Container {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath).
Build(ldflags, trimpath, platforms)
}
@function
def example(source: dagger.Directory, path: str, main_package_path: str, ldflags: List[str], trimpath: bool, platforms: List[]) -> List[dagger.Container]:
return (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
.build(ldflags, trimpath, platforms)
)
@func()
example(source: Directory, path: string, mainPackagePath: string, ldflags: string[], trimpath: boolean, platforms: []): Container[] {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
.build(ldflags, trimpath, platforms)
}
asService() 🔗
Create a service based on application container image.
Return Type
Service !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
ldflags | [String ! ] ! | ["-s","-w"] | No description provided |
tags | [String ! ] | - | No description provided |
trimpath | Boolean ! | true | No description provided |
enableCgo | Boolean | - | No description provided |
args | [String ! ] | - | No description provided |
platform | Scalar ! | "linux/amd64" | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string \
as-service --ldflags string1 --ldflags string2 --trimpath boolean
func (m *MyModule) Example(source *dagger.Directory, path string, mainPackagePath string, ldflags []string, trimpath bool, platform ) *dagger.Service {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath).
AsService(ldflags, trimpath, platform)
}
@function
def example(source: dagger.Directory, path: str, main_package_path: str, ldflags: List[str], trimpath: bool, platform: ) -> dagger.Service:
return (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
.as_service(ldflags, trimpath, platform)
)
@func()
example(source: Directory, path: string, mainPackagePath: string, ldflags: string[], trimpath: boolean, platform: ): Service {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
.asService(ldflags, trimpath, platform)
}
scan() 🔗
Scan application container image(s).
Return Type
Void !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
platformVariants | [Container ! ] ! | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string \
scan
func (m *MyModule) Example(ctx context.Context, source *dagger.Directory, path string, mainPackagePath string, platformVariants []*dagger.Container) {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath).
Scan(ctx, platformVariants)
}
@function
async def example(source: dagger.Directory, path: str, main_package_path: str, platform_variants: List[dagger.Container]) -> None:
return await (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
.scan(platform_variants)
)
@func()
async example(source: Directory, path: string, mainPackagePath: string, platformVariants: Container[]): Promise<void> {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
.scan(platformVariants)
}
publish() 🔗
Publish application container image(s).
Return Type
[PublishResult ! ] !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
registry | String ! | - | No description provided |
imageName | String ! | - | No description provided |
imageTags | [String ! ] ! | - | No description provided |
platformVariants | [Container ! ] ! | - | No description provided |
registryUsername | String ! | - | No description provided |
registrySecret | Secret ! | - | No description provided |
Example
dagger -m github.com/z5labs/daggerverse/go@de964337c54aad97de8016472ea46620230035ae call \
module --source DIR_PATH --path string \
library \
application --main-package-path string \
publish --registry string --image-name string --image-tags string1 --image-tags string2 --registry-username string --registry-secret env:MYSECRET
func (m *MyModule) Example(source *dagger.Directory, path string, mainPackagePath string, registry string, imageName string, imageTags []string, platformVariants []*dagger.Container, registryUsername string, registrySecret *dagger.Secret) []*dagger.GoPublishResult {
return dag.
Go().
Module(source, path).
Library().
Application(mainPackagePath).
Publish(registry, imageName, imageTags, platformVariants, registryUsername, registrySecret)
}
@function
def example(source: dagger.Directory, path: str, main_package_path: str, registry: str, image_name: str, image_tags: List[str], platform_variants: List[dagger.Container], registry_username: str, registry_secret: dagger.Secret) -> List[dagger.GoPublishResult]:
return (
dag.go()
.module(source, path)
.library()
.application(main_package_path)
.publish(registry, image_name, image_tags, platform_variants, registry_username, registry_secret)
)
@func()
example(source: Directory, path: string, mainPackagePath: string, registry: string, imageName: string, imageTags: string[], platformVariants: Container[], registryUsername: string, registrySecret: Secret): GoPublishResult[] {
return dag
.go()
.module(source, path)
.library()
.application(mainPackagePath)
.publish(registry, imageName, imageTags, platformVariants, registryUsername, registrySecret)
}
PublishResult 🔗
registry() 🔗
Return Type
String !
Example
Function GoPublishResult.registry is not accessible from the go module
Function GoPublishResult.registry is not accessible from the go module
Function GoPublishResult.registry is not accessible from the go module
Function GoPublishResult.registry is not accessible from the go module
imageName() 🔗
Return Type
String !
Example
Function GoPublishResult.imageName is not accessible from the go module
Function GoPublishResult.imageName is not accessible from the go module
Function GoPublishResult.imageName is not accessible from the go module
Function GoPublishResult.imageName is not accessible from the go module
tag() 🔗
Return Type
String !
Example
Function GoPublishResult.tag is not accessible from the go module
Function GoPublishResult.tag is not accessible from the go module
Function GoPublishResult.tag is not accessible from the go module
Function GoPublishResult.tag is not accessible from the go module
digest() 🔗
Return Type
String !
Example
Function GoPublishResult.digest is not accessible from the go module
Function GoPublishResult.digest is not accessible from the go module
Function GoPublishResult.digest is not accessible from the go module
Function GoPublishResult.digest is not accessible from the go module
string() 🔗
Format publish result as a string.
Return Type
String !
Example
Function GoPublishResult.string is not accessible from the go module
Function GoPublishResult.string is not accessible from the go module
Function GoPublishResult.string is not accessible from the go module
Function GoPublishResult.string is not accessible from the go module
json() 🔗
Format publish result as JSON.
Return Type
String !
Example
Function GoPublishResult.json is not accessible from the go module
Function GoPublishResult.json is not accessible from the go module
Function GoPublishResult.json is not accessible from the go module
Function GoPublishResult.json is not accessible from the go module