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/dagger/types.go
Solomon Hykes acba8b3988 Simplify runtime code by removing layers of abstraction
- Remove intermediary types `Component`, `Script`, `Op`, `mount`: just use
  `cc.Value` directly
- Remove `Executable` interface.
- Execute llb code with a simple concrete type `Pipeline`
- Analyze llb code with a simple utility `Analyze`

Signed-off-by: Solomon Hykes <sh.github.6811@hykes.org>
2021-02-12 22:20:20 +00:00

29 lines
440 B
Go

package dagger
import (
"os"
cueflow "cuelang.org/go/tools/flow"
)
var ErrNotExist = os.ErrNotExist
// Something which can be filled in-place with a cue value
type Fillable struct {
t *cueflow.Task
}
func NewFillable(t *cueflow.Task) *Fillable {
return &Fillable{
t: t,
}
}
func (f *Fillable) Fill(x interface{}) error {
// Use a nil pointer receiver to discard all values
if f == nil {
return nil
}
return f.t.Fill(x)
}