Skip to content

Commit

Permalink
Update the methods of "PatchConfig" so that all use pointer receivers
Browse files Browse the repository at this point in the history
Corrects for recvcheck linter finding.
  • Loading branch information
tjmoore4 committed Dec 6, 2024
1 parent dc1c5be commit a63a785
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit a63a785

Please sign in to comment.