From b4a2ca9d840c8c9e36ca32903618f3374611a8d5 Mon Sep 17 00:00:00 2001 From: TJ Moore Date: Fri, 6 Dec 2024 15:36:27 -0500 Subject: [PATCH] Update the methods of "PatchConfig" so that all use pointer receivers Corrects for recvcheck linter finding. --- internal/config.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/config.go b/internal/config.go index 25e6fc4..c476ddb 100644 --- a/internal/config.go +++ b/internal/config.go @@ -33,13 +33,13 @@ func (cfg *PatchConfig) AddFlags(flags *pflag.FlagSet) { } // CreateOptions returns a copy of opts with fields set according to cfg. -func (cfg PatchConfig) CreateOptions(opts metav1.CreateOptions) metav1.CreateOptions { +func (cfg *PatchConfig) CreateOptions(opts metav1.CreateOptions) metav1.CreateOptions { opts.FieldManager = cfg.FieldManager return opts } // PatchOptions returns a copy of opts with fields set according to cfg. -func (cfg PatchConfig) PatchOptions(opts metav1.PatchOptions) metav1.PatchOptions { +func (cfg *PatchConfig) PatchOptions(opts metav1.PatchOptions) metav1.PatchOptions { opts.FieldManager = cfg.FieldManager return opts }