with buildpath
This commit is contained in:
27
example/main.go
Normal file
27
example/main.go
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"log"
|
||||
|
||||
"git.front.kjuulh.io/kjuulh/dagger-go/internal"
|
||||
"git.front.kjuulh.io/kjuulh/dagger-go/pkg/tasks"
|
||||
)
|
||||
|
||||
func main() {
|
||||
ctx := context.Background()
|
||||
|
||||
if err := run(ctx); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
func run(ctx context.Context) error {
|
||||
builder, err := internal.New(ctx)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer builder.CleanUp()
|
||||
|
||||
return tasks.Build(builder, "some-image")
|
||||
}
|
Reference in New Issue
Block a user