From 710770eed4ffa97c1d29e34e6f661d0ab5ef4cd1 Mon Sep 17 00:00:00 2001 From: Benoit Tigeot Date: Mon, 7 Apr 2025 17:46:13 +0200 Subject: [PATCH] Linting Signed-off-by: Benoit Tigeot --- cmd/helm/helm.go | 2 +- pkg/action/action_test.go | 2 +- pkg/cli/logger.go | 2 +- pkg/cmd/plugin_list.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cmd/helm/helm.go b/cmd/helm/helm.go index c2605f377..11c5e8769 100644 --- a/cmd/helm/helm.go +++ b/cmd/helm/helm.go @@ -46,7 +46,7 @@ func main() { } if err := cmd.Execute(); err != nil { - helmcmd.Logger.Debug("error", err) + helmcmd.Logger.Debug("error", slog.Any("error", err)) switch e := err.(type) { case helmcmd.PluginError: os.Exit(e.Code) diff --git a/pkg/action/action_test.go b/pkg/action/action_test.go index 815d1a0c8..c770f3920 100644 --- a/pkg/action/action_test.go +++ b/pkg/action/action_test.go @@ -46,7 +46,7 @@ func actionConfigFixture(t *testing.T) *Configuration { // Create a handler that removes timestamps handler := slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ Level: slog.LevelDebug, - ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + ReplaceAttr: func(_ []string, a slog.Attr) slog.Attr { // Remove the time attribute if a.Key == slog.TimeKey { return slog.Attr{} diff --git a/pkg/cli/logger.go b/pkg/cli/logger.go index 243284d76..d75622c37 100644 --- a/pkg/cli/logger.go +++ b/pkg/cli/logger.go @@ -30,7 +30,7 @@ func NewLogger(debug bool) *slog.Logger { // Create a handler that removes timestamps handler := slog.NewTextHandler(os.Stdout, &slog.HandlerOptions{ Level: level, - ReplaceAttr: func(groups []string, a slog.Attr) slog.Attr { + ReplaceAttr: func(_ []string, a slog.Attr) slog.Attr { // Remove the time attribute if a.Key == slog.TimeKey { return slog.Attr{} diff --git a/pkg/cmd/plugin_list.go b/pkg/cmd/plugin_list.go index 3a1d0f2f5..52aefe8ef 100644 --- a/pkg/cmd/plugin_list.go +++ b/pkg/cmd/plugin_list.go @@ -32,7 +32,7 @@ func newPluginListCmd(out io.Writer) *cobra.Command { Short: "list installed Helm plugins", ValidArgsFunction: noMoreArgsCompFunc, RunE: func(_ *cobra.Command, _ []string) error { - Logger.Debug("pluginDirs", settings.PluginsDirectory) + Logger.Debug("pluginDirs", "directory", settings.PluginsDirectory) plugins, err := plugin.FindPlugins(settings.PluginsDirectory) if err != nil { return err