acba8b3988
- 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>
29 lines
440 B
Go
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)
|
|
}
|