0aea10d23e
- Implement dagger.#FS support - Migrate `context.imports` to dagger.#FS - Backward compat: dagger.#FS can be passed in lieu of a dagger.#Artifact - For instance, an import (`dagger.#FS`) can be passed to the current `yarn.#Package` implementation Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
15 lines
333 B
Go
15 lines
333 B
Go
package task
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/moby/buildkit/client/llb"
|
|
"go.dagger.io/dagger/compiler"
|
|
)
|
|
|
|
func withCustomName(v *compiler.Value, format string, a ...interface{}) llb.ConstraintsOpt {
|
|
prefix := fmt.Sprintf("@%s@", v.Path().String())
|
|
name := fmt.Sprintf(format, a...)
|
|
return llb.WithCustomName(prefix + " " + name)
|
|
}
|