From 203ee24007d90dcdaac1f9bd6be7f2a6b7b44423 Mon Sep 17 00:00:00 2001 From: Kingdon Barrett Date: Mon, 1 Aug 2022 11:19:59 -0400 Subject: [PATCH] revert logic change in #2851 An unrelated logic change appears to have been accidentally included with #2851 This PR reverts the update to use EqualFold, and the discarding of the ToLower calls so the function reads as it was when it was approved here: https://github.com/fluxcd/flux2/commit/8abaa39f9775edd97ae5bc6424cbf872a15cd57c Signed-off-by: Kingdon Barrett --- cmd/flux/logs.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/flux/logs.go b/cmd/flux/logs.go index 90ee8fbe..bcbc9b18 100644 --- a/cmd/flux/logs.go +++ b/cmd/flux/logs.go @@ -278,9 +278,9 @@ func logRequest(ctx context.Context, request rest.ResponseWrapper, w io.Writer) func filterPrintLog(t *template.Template, l *ControllerLogEntry, w io.Writer) { if logsArgs.logLevel != "" && logsArgs.logLevel != l.Level || - logsArgs.kind != "" && strings.EqualFold(logsArgs.kind, l.Kind) || - logsArgs.name != "" && strings.EqualFold(logsArgs.name, l.Name) || - !logsArgs.allNamespaces && strings.EqualFold(*kubeconfigArgs.Namespace, l.Namespace) { + logsArgs.kind != "" && strings.ToLower(logsArgs.kind) != strings.ToLower(l.Kind) || + logsArgs.name != "" && strings.ToLower(logsArgs.name) != strings.ToLower(l.Name) || + !logsArgs.allNamespaces && strings.ToLower(*kubeconfigArgs.Namespace) != strings.ToLower(l.Namespace) { return } err := t.Execute(w, l)