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

Method WithoutAnnotation

core/container.go:6353–6365  ·  view source on GitHub ↗

mutates container caller must have handled cloning or creating a new child.

(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

6351
6352// mutates container caller must have handled cloning or creating a new child.
6353func (container *Container) WithoutAnnotation(ctx context.Context, name string) (*Container, error) {
6354 for i, annotation := range container.Annotations {
6355 if annotation.Key == name {
6356 container.Annotations = slices.Delete(container.Annotations, i, i+1)
6357 break
6358 }
6359 }
6360
6361 // set image ref to empty string
6362 container.ImageRef = ""
6363
6364 return container, nil
6365}
6366
6367func (container *Container) Publish(
6368 ctx context.Context,

Callers 1

EvaluateMethod · 0.45

Calls 1

DeleteMethod · 0.45

Tested by

no test coverage detected