MCPcopy Create free account
hub / github.com/dagger/dagger / WithoutSecretVariable

Method WithoutSecretVariable

core/container.go:6040–6052  ·  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

6038
6039// mutates container caller must have handled cloning or creating a new child.
6040func (container *Container) WithoutSecretVariable(ctx context.Context, name string) (*Container, error) {
6041 for i, secret := range container.Secrets {
6042 if secret.EnvName == name {
6043 container.Secrets = slices.Delete(container.Secrets, i, i+1)
6044 break
6045 }
6046 }
6047
6048 // set image ref to empty string
6049 container.ImageRef = ""
6050
6051 return container, nil
6052}
6053
6054// locatePath finds the mount that contains the given container path. It returns
6055// the mount and the subpath of containerPath relative to the mountpoint.

Callers 1

EvaluateMethod · 0.45

Calls 1

DeleteMethod · 0.45

Tested by

no test coverage detected