Brush all the lint off this code I wrote in a haze
This commit is contained in:
@@ -5,14 +5,17 @@ import (
|
||||
"github.com/pelotech/drone-helm3/internal/run"
|
||||
)
|
||||
|
||||
// A Step is one step in the plan.
|
||||
type Step interface {
|
||||
Run() error
|
||||
}
|
||||
|
||||
// A Plan is a series of steps to perform.
|
||||
type Plan struct {
|
||||
steps []Step
|
||||
}
|
||||
|
||||
// NewPlan makes a plan for running a helm operation.
|
||||
func NewPlan(cfg Config) (*Plan, error) {
|
||||
p := Plan{}
|
||||
switch cfg.Command {
|
||||
@@ -44,6 +47,7 @@ func NewPlan(cfg Config) (*Plan, error) {
|
||||
return &p, nil
|
||||
}
|
||||
|
||||
// Execute runs each step in the plan, aborting and reporting on error
|
||||
func (p *Plan) Execute() error {
|
||||
for _, step := range p.steps {
|
||||
if err := step.Run(); err != nil {
|
||||
|
||||
Reference in New Issue
Block a user