MCPcopy Index your code
hub / github.com/dagger/dagger / WithTag

Method WithTag

sdk/python/runtime/image.go:56–65  ·  view source on GitHub ↗

WithTag replaces the tag in the image reference.

(tag string)

Source from the content-addressed store, hash-verified

54
55// WithTag replaces the tag in the image reference.
56func (i Image) WithTag(tag string) (Image, error) {
57 if i.named == nil {
58 return Image{}, fmt.Errorf("empty image")
59 }
60 tagged, err := reference.WithTag(reference.TrimNamed(i.named), tag)
61 if err != nil {
62 return i, err
63 }
64 return Image{named: tagged}, nil
65}
66
67// Equal returns true if the given image reference begins with the current one.
68//

Callers 2

parseBaseImageMethod · 0.80
parseUvImageMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected