cleanup workspace interface

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-06-16 14:58:05 +02:00
committed by Solomon Hykes
parent 7f456b9131
commit b393ecc034
3 changed files with 15 additions and 5 deletions

View File

@@ -9,6 +9,7 @@ import (
"github.com/spf13/viper"
"go.dagger.io/dagger/cmd/dagger/cmd/common"
"go.dagger.io/dagger/cmd/dagger/logger"
"go.dagger.io/dagger/state"
)
var newCmd = &cobra.Command{
@@ -55,7 +56,10 @@ var newCmd = &cobra.Command{
module = p
}
ws, err := workspace.Create(ctx, name, module, viper.GetString("package"))
ws, err := workspace.Create(ctx, name, state.CreateOpts{
Module: module,
Package: viper.GetString("package"),
})
if err != nil {
lg.Fatal().Err(err).Msg("failed to create environment")
}