From feed293545578ea942736231f2e33bea28e63496 Mon Sep 17 00:00:00 2001 From: lasith-kg Date: Tue, 26 Dec 2023 07:57:52 +0000 Subject: [PATCH] (feat): Warning Disabled Renaming --- internal/layer/directory.go | 2 +- internal/layer/layer.go | 4 ++-- internal/layer/owner.go | 2 +- internal/layer/permissions.go | 2 +- internal/layer/resize.go | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/internal/layer/directory.go b/internal/layer/directory.go index 5dc96cb..5414542 100644 --- a/internal/layer/directory.go +++ b/internal/layer/directory.go @@ -64,5 +64,5 @@ func (fdl *CreateDirectoryLayer) Validate(c *config.Config) error { } func (fdl *CreateDirectoryLayer) Warning() string { - return DisableWarning + return DisabledWarning } diff --git a/internal/layer/layer.go b/internal/layer/layer.go index af21d0b..dc38577 100644 --- a/internal/layer/layer.go +++ b/internal/layer/layer.go @@ -17,7 +17,7 @@ const ( ) const ( - DisableWarning = "" + DisabledWarning = "" ) type Layer interface { @@ -67,7 +67,7 @@ func (le *ExponentialBackoffLayerExecutor) Execute(layers []Layer) error { } // Only print warning if actions are detected and a valid warning // message is provided - if warning := layer.Warning(); len(actions) > 0 && warning != DisableWarning { + if warning := layer.Warning(); len(actions) > 0 && warning != DisabledWarning { log.Printf("🟠 %s", warning) } err = le.actionExecutor.Execute(actions) diff --git a/internal/layer/owner.go b/internal/layer/owner.go index 15b669d..5b9aa1b 100644 --- a/internal/layer/owner.go +++ b/internal/layer/owner.go @@ -120,5 +120,5 @@ func (fdl *ChangeOwnerLayer) Validate(c *config.Config) error { } func (fdl *ChangeOwnerLayer) Warning() string { - return DisableWarning + return DisabledWarning } diff --git a/internal/layer/permissions.go b/internal/layer/permissions.go index 8410bd2..8ebaea7 100644 --- a/internal/layer/permissions.go +++ b/internal/layer/permissions.go @@ -70,5 +70,5 @@ func (fdl *ChangePermissionsLayer) Validate(c *config.Config) error { } func (fdl *ChangePermissionsLayer) Warning() string { - return DisableWarning + return DisabledWarning } diff --git a/internal/layer/resize.go b/internal/layer/resize.go index 5afdb6a..34a947c 100644 --- a/internal/layer/resize.go +++ b/internal/layer/resize.go @@ -79,5 +79,5 @@ func (fdl *ResizeDeviceLayer) Validate(c *config.Config) error { } func (fdl *ResizeDeviceLayer) Warning() string { - return DisableWarning + return DisabledWarning }