combine fileLoader.New and NewLoader into one function: NewLoader

This commit is contained in:
Jingfang Liu
2018-08-15 11:01:48 -07:00
parent f018370628
commit 72b1a4bc5c
6 changed files with 27 additions and 24 deletions

View File

@@ -74,7 +74,7 @@ func (o *buildOptions) Validate(args []string) error {
// RunBuild runs build command.
func (o *buildOptions) RunBuild(out io.Writer, fSys fs.FileSystem) error {
rootLoader, err := loader.NewLoader(o.kustomizationPath, fSys)
rootLoader, err := loader.NewLoader(o.kustomizationPath, "", fSys)
if err != nil {
return err
}

View File

@@ -67,7 +67,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 {
rootLoader, err := loader.NewLoader(o.kustomizationPath, fSys)
rootLoader, err := loader.NewLoader(o.kustomizationPath, "", fSys)
if err != nil {
return err
}