From fc3f8b503670a13625b7d658853417debdfd7223 Mon Sep 17 00:00:00 2001 From: Stavros Date: Wed, 26 Feb 2025 19:31:37 +0200 Subject: [PATCH] refactor: rename the run function to runCheck in the docker helper --- internal/docker/docker.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/internal/docker/docker.go b/internal/docker/docker.go index 0788f96..b3e4a40 100644 --- a/internal/docker/docker.go +++ b/internal/docker/docker.go @@ -70,7 +70,7 @@ func (docker *Docker) DockerConnected() bool { return err == nil } -func (docker *Docker) ContainerAction(appId string, run func(labels appTypes.TinyauthLabels) (bool, error)) (bool, error) { +func (docker *Docker) ContainerAction(appId string, runCheck func(labels appTypes.TinyauthLabels) (bool, error)) (bool, error) { // Check if we have access to the Docker API isConnected := docker.DockerConnected() @@ -112,14 +112,14 @@ func (docker *Docker) ContainerAction(appId string, run func(labels appTypes.Tin log.Debug().Msg("Got labels") - // Run the function - return run(labels) + // Run the check + return runCheck(labels) } } - log.Debug().Msg("No matching container found, allowing access") + log.Debug().Msg("No matching container found, passing check") - // If no matching container is found, allow access + // If no matching container is found, pass check return true, nil }