renamed Import to LocalDirectory

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2021-12-16 12:22:36 -07:00
parent c15a7c6d22
commit 4768425037
No known key found for this signature in database
GPG Key ID: CFB3A382EB166F4C

View File

@ -10,13 +10,13 @@ import (
)
func init() {
Register("Import", func() Task { return &importTask{} })
Register("LocalDirectory", func() Task { return &localDirectoryTask{} })
}
type importTask struct {
type localDirectoryTask struct {
}
func (c importTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
func (c localDirectoryTask) Run(ctx context.Context, pctx *plancontext.Context, s solver.Solver, v *compiler.Value) (*compiler.Value, error) {
var dir struct {
Path string
Include []string
@ -69,6 +69,6 @@ func (c importTask) Run(ctx context.Context, pctx *plancontext.Context, s solver
fs := pctx.FS.New(result)
return compiler.NewValue().FillFields(map[string]interface{}{
"fs": fs.MarshalCUE(),
"contents": fs.MarshalCUE(),
})
}