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/util.go
Andrea Luzzardi 0aea10d23e dagger.#FS support
- 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>
2021-11-30 12:58:50 -08:00

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)
}