This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/plan/task/clientplatform.go
Helder Correia da90baa087
Add new Client API
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
2022-03-07 17:13:16 -01:00

25 lines
535 B
Go

package task
import (
"context"
"runtime"
"go.dagger.io/dagger/compiler"
"go.dagger.io/dagger/plancontext"
"go.dagger.io/dagger/solver"
)
func init() {
Register("ClientPlatform", func() Task { return &clientPlatformTask{} })
}
type clientPlatformTask struct {
}
func (t clientPlatformTask) Run(ctx context.Context, pctx *plancontext.Context, _ solver.Solver, v *compiler.Value) (*compiler.Value, error) {
return compiler.NewValue().FillFields(map[string]interface{}{
"os": runtime.GOOS,
"arch": runtime.GOARCH,
})
}