Combine loaderImpl and fileLoader.

This commit is contained in:
Jeffrey Regan
2018-07-25 17:23:04 -07:00
parent 4569a09d54
commit 9e5374e725
8 changed files with 57 additions and 85 deletions

View File

@@ -70,7 +70,7 @@ func (o *buildOptions) Validate(args []string) error {
// RunBuild runs build command.
func (o *buildOptions) RunBuild(out io.Writer, fSys fs.FileSystem) error {
l := loader.NewLoader(loader.NewFileLoader(fSys))
l := loader.NewFileLoader(fSys)
absPath, err := filepath.Abs(o.kustomizationPath)
if err != nil {

View File

@@ -65,7 +65,7 @@ func newCmdAddConfigMap(fSys fs.FileSystem) *cobra.Command {
err = addConfigMap(
kustomization, flagsAndArgs,
configmapandsecret.NewConfigMapFactory(
fSys, loader.NewLoader(loader.NewFileLoader(fSys))))
fSys, loader.NewFileLoader(fSys)))
if err != nil {
return err
}

View File

@@ -68,7 +68,7 @@ func (o *diffOptions) Validate(args []string) error {
// RunDiff gets the differences between Application.MakeCustomizedResMap() and Application.MakeUncustomizedResMap().
func (o *diffOptions) RunDiff(out, errOut io.Writer, fSys fs.FileSystem) error {
l := loader.NewLoader(loader.NewFileLoader(fSys))
l := loader.NewFileLoader(fSys)
absPath, err := filepath.Abs(o.kustomizationPath)
if err != nil {