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

15 lines
333 B
Go
Raw Normal View History

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