Rename and refactor overlay constructor functions

- Reduces redundancy
- Adds clarity

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
This commit is contained in:
Jonathon Anderson
2024-12-18 06:56:43 -07:00
committed by Christian Goll
parent 717241aa18
commit ac49ecef70
14 changed files with 93 additions and 67 deletions

View File

@@ -27,7 +27,7 @@ func CobraRunE(cmd *cobra.Command, args []string) error {
}
wwlog.Verbose("Copying '%s' into overlay '%s:%s'", source, overlayName, dest)
overlaySource, _ = overlay.OverlaySourceDir(overlayName)
overlaySource, _ = overlay.GetOverlay(overlayName)
if !util.IsDir(overlaySource) {
return fmt.Errorf("overlay does not exist: %s", overlayName)