Initialize Steps with a NewSTEPNAME function [#67]

This seems to be be a more natural separation of concerns--the knowledge
of which config fields map to which parts of a Step belong to the Step,
not to the Plan.
This commit is contained in:
Erin Call
2020-01-16 13:50:04 -08:00
parent 16117eea2f
commit 588c7cb9f7
16 changed files with 218 additions and 179 deletions

View File

@@ -11,6 +11,13 @@ type AddRepo struct {
cmd cmd
}
// NewAddRepo creates an AddRepo for the given repo-spec. No validation is performed at this time.
func NewAddRepo(repo string) *AddRepo {
return &AddRepo{
Repo: repo,
}
}
// Execute executes the `helm repo add` command.
func (a *AddRepo) Execute(_ Config) error {
return a.cmd.Run()