Refactor localizer code

* encapsulate kusttarget params
* change dst to string
* ConfirmDir
This commit is contained in:
Anna Song
2022-12-01 09:53:46 -08:00
parent f53d018302
commit b8611cf0a9
3 changed files with 97 additions and 87 deletions

View File

@@ -15,11 +15,13 @@ import (
"sigs.k8s.io/kustomize/kyaml/filesys"
)
// DstPrefix prefixes the target and ref, if target is remote, in the default localize destination directory name
const DstPrefix = "localized"
const (
// DstPrefix prefixes the target and ref, if target is remote, in the default localize destination directory name
DstPrefix = "localized"
// LocalizeDir is the name of the localize directories used to store remote content in the localize destination
const LocalizeDir = "localized-files"
// LocalizeDir is the name of the localize directories used to store remote content in the localize destination
LocalizeDir = "localized-files"
)
// establishScope returns the effective scope given localize arguments and targetLdr at rawTarget. For remote rawTarget,
// the effective scope is the downloaded repo.