mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-30 01:46:23 +00:00
remove decoder interface since it is only used inside k8sdeps
This commit is contained in:
@@ -65,7 +65,7 @@ func NewCmdBuild(
|
||||
out io.Writer, fs fs.FileSystem,
|
||||
kf ifc.KunstructuredFactory,
|
||||
ptf patch.TransformerFactory,
|
||||
decoder ifc.Decoder, hash ifc.Hash) *cobra.Command {
|
||||
hash ifc.Hash) *cobra.Command {
|
||||
var o buildOptions
|
||||
var p string
|
||||
|
||||
@@ -79,7 +79,7 @@ func NewCmdBuild(
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return o.RunBuild(out, fs, kf, ptf, decoder, hash)
|
||||
return o.RunBuild(out, fs, kf, ptf, hash)
|
||||
},
|
||||
}
|
||||
cmd.Flags().StringVarP(
|
||||
@@ -126,7 +126,7 @@ func (o *buildOptions) RunBuild(
|
||||
out io.Writer, fSys fs.FileSystem,
|
||||
kf ifc.KunstructuredFactory,
|
||||
ptf patch.TransformerFactory,
|
||||
decoder ifc.Decoder, hash ifc.Hash) error {
|
||||
hash ifc.Hash) error {
|
||||
rootLoader, err := loader.NewLoader(o.kustomizationPath, "", fSys)
|
||||
if err != nil {
|
||||
return err
|
||||
@@ -137,7 +137,7 @@ func (o *buildOptions) RunBuild(
|
||||
resmap.NewFactory(resource.NewFactory(kf)),
|
||||
ptf,
|
||||
makeTransformerconfig(fSys, o.transformerconfigPaths),
|
||||
decoder, hash)
|
||||
hash)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -131,9 +131,9 @@ func runBuildTestCase(t *testing.T, testcaseName string, updateKustomizeExpected
|
||||
buf := bytes.NewBuffer([]byte{})
|
||||
err = ops.RunBuild(
|
||||
buf, fSys,
|
||||
k8sdeps.NewKunstructuredFactoryImpl(k8sdeps.NewKustDecoder()),
|
||||
k8sdeps.NewKunstructuredFactoryImpl(),
|
||||
patch.NewPatchTransformerFactory(),
|
||||
k8sdeps.NewKustDecoder(), k8sdeps.NewKustHash())
|
||||
k8sdeps.NewKustHash())
|
||||
switch {
|
||||
case err != nil && len(testcase.ExpectedError) == 0:
|
||||
t.Errorf("unexpected error: %v", err)
|
||||
|
||||
@@ -33,7 +33,6 @@ import (
|
||||
// NewDefaultCommand returns the default (aka root) command for kustomize command.
|
||||
func NewDefaultCommand(
|
||||
kf ifc.KunstructuredFactory, ptf patch.TransformerFactory,
|
||||
decoder ifc.Decoder,
|
||||
validator ifc.Validator, hash ifc.Hash) *cobra.Command {
|
||||
fsys := fs.MakeRealFS()
|
||||
stdOut := os.Stdout
|
||||
@@ -50,7 +49,7 @@ See https://sigs.k8s.io/kustomize
|
||||
|
||||
c.AddCommand(
|
||||
// TODO: Make consistent API for newCmd* functions.
|
||||
build.NewCmdBuild(stdOut, fsys, kf, ptf, decoder, hash),
|
||||
build.NewCmdBuild(stdOut, fsys, kf, ptf, hash),
|
||||
edit.NewCmdEdit(fsys, validator, kf),
|
||||
misc.NewCmdConfig(fsys),
|
||||
misc.NewCmdVersion(stdOut),
|
||||
|
||||
Reference in New Issue
Block a user