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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user