hide core/v1 behind interface

This commit is contained in:
Jingfang Liu
2018-10-09 14:51:37 -07:00
parent 0faef46773
commit f783486057
17 changed files with 112 additions and 77 deletions

View File

@@ -25,7 +25,7 @@ import (
)
// NewCmdEdit returns an instance of 'edit' subcommand.
func NewCmdEdit(fsys fs.FileSystem, v ifc.Validator) *cobra.Command {
func NewCmdEdit(fsys fs.FileSystem, v ifc.Validator, kf ifc.KunstructuredFactory) *cobra.Command {
c := &cobra.Command{
Use: "edit",
Short: "Edits a kustomization file",
@@ -40,7 +40,7 @@ func NewCmdEdit(fsys fs.FileSystem, v ifc.Validator) *cobra.Command {
Args: cobra.MinimumNArgs(1),
}
c.AddCommand(
add.NewCmdAdd(fsys, v),
add.NewCmdAdd(fsys, v, kf),
set.NewCmdSet(fsys, v),
)
return c