mutates container caller must have handled cloning or creating a new child.
(ctx context.Context, name string)
| 6038 | |
| 6039 | // mutates container caller must have handled cloning or creating a new child. |
| 6040 | func (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. |