mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-06-14 02:20:53 +00:00
Improve readability of ifc.Loader's Repo() method (#4857)
* Improve ldr Repo() method readability * Change Repo() implementations and calls * Improve readability of conditions in ldr.New() * Fix details
This commit is contained in:
@@ -121,13 +121,13 @@ func NewFileLoaderAtRoot(fSys filesys.FileSystem) *fileLoader {
|
||||
RestrictionRootOnly, fSys, filesys.Separator)
|
||||
}
|
||||
|
||||
// Repo returns the absolute path to the repo that contains Root and true
|
||||
// if this fileLoader was created from a url; otherwise, the empty string and false
|
||||
func (fl *fileLoader) Repo() (string, bool) {
|
||||
// Repo returns the absolute path to the repo that contains Root if this fileLoader was created from a url
|
||||
// or the empty string otherwise.
|
||||
func (fl *fileLoader) Repo() string {
|
||||
if fl.repoSpec != nil {
|
||||
return fl.repoSpec.Dir.String(), true
|
||||
return fl.repoSpec.Dir.String()
|
||||
}
|
||||
return "", false
|
||||
return ""
|
||||
}
|
||||
|
||||
// Root returns the absolute path that is prepended to any
|
||||
|
||||
Reference in New Issue
Block a user