grim/convey
Clone
Summary
Browse
Changes
Graph
Add the recursive environment expanding back with a much simplier algorithm
redux
2021-10-11, Gary Kramlich
d434a60a38b3
Add the recursive environment expanding back with a much simplier algorithm
package
docker
import
(
"fmt"
log
"github.com/sirupsen/logrus"
"keep.imfreedom.org/grim/convey/environment"
"keep.imfreedom.org/grim/convey/podman"
"keep.imfreedom.org/grim/convey/runtime"
"keep.imfreedom.org/grim/convey/tasks"
"keep.imfreedom.org/grim/convey/yaml"
)
type
Remove
struct
{
Image
string
`yaml:"image"`
Images
yaml
.
StringOrSlice
`yaml:"images"`
Quiet
bool
`yaml:"quiet"`
realRemove
*
podman
.
Remove
}
func
(
r
*
Remove
)
Execute
(
name
string
,
logger
*
log
.
Entry
,
stageEnv
environment
.
Environment
,
rt
*
runtime
.
Runtime
)
error
{
return
r
.
realRemove
.
Execute
(
name
,
logger
,
stageEnv
,
rt
)
}
func
(
r
*
Remove
)
New
()
tasks
.
Task
{
return
&
Remove
{}
}
func
(
r
*
Remove
)
Valid
()
error
{
if
r
.
Image
!=
""
{
r
.
Images
=
append
([]
string
{
r
.
Image
},
r
.
Images
...
)
}
r
.
realRemove
=
&
podman
.
Remove
{
Tags
:
r
.
Images
,
}
return
r
.
realRemove
.
Valid
()
}
func
(
r
*
Remove
)
Deprecated
()
error
{
return
fmt
.
Errorf
(
"docker/remove has been deprecated in favor of podman/remove since 0.15.0"
)
}