Isolate k8sdeps to top level internal.

This commit is contained in:
Jeffrey Regan
2018-10-03 10:18:03 -07:00
parent 132cdad7c4
commit e32e5c21d7
9 changed files with 12 additions and 10 deletions

View File

@@ -20,7 +20,6 @@ package commands
import (
"flag"
"os"
"sigs.k8s.io/kustomize/pkg/internal/k8sdeps"
"github.com/spf13/cobra"
"sigs.k8s.io/kustomize/pkg/fs"
@@ -28,7 +27,8 @@ import (
)
// NewDefaultCommand returns the default (aka root) command for kustomize command.
func NewDefaultCommand() *cobra.Command {
func NewDefaultCommand(
decoder ifc.Decoder, validator ifc.Validator) *cobra.Command {
fsys := fs.MakeRealFS()
stdOut := os.Stdout
@@ -44,8 +44,8 @@ See https://sigs.k8s.io/kustomize
c.AddCommand(
// TODO: Make consistent API for newCmd* functions.
newCmdBuild(stdOut, fsys, k8sdeps.NewKustDecoder()),
newCmdEdit(fsys, k8sdeps.NewKustValidator()),
newCmdBuild(stdOut, fsys, decoder),
newCmdEdit(fsys, validator),
newCmdConfig(fsys),
newCmdVersion(stdOut),
)