with actual cli

This commit is contained in:
2022-10-30 18:33:59 +01:00
parent 2b641df577
commit 18f7e1fc27
10 changed files with 107 additions and 66 deletions

27
pkg/builder/builder.go Normal file
View File

@@ -0,0 +1,27 @@
package builder
import (
"context"
"os"
"dagger.io/dagger"
)
type Builder struct {
Dagger *dagger.Client
}
func New(ctx context.Context) (*Builder, error) {
client, err := dagger.Connect(ctx, dagger.WithLogOutput(os.Stdout))
if err != nil {
return nil, err
}
return &Builder{
Dagger: client,
}, nil
}
func (b *Builder) CleanUp() error {
return b.Dagger.Close()
}