external-dns icon indicating copy to clipboard operation
external-dns copied to clipboard

chore(domainfilter): use pointer receivers for DomainFilter

Open u-kai opened this issue 5 months ago • 5 comments
trafficstars

What does it do ?

Standardizes DomainFilter method receivers to use pointer receivers consistently. Changes DomainFilter methods (Match, IsConfigured, MarshalJSON, MatchParent) from value receivers to pointer receivers, and fixes the corresponding json.Marshal call to use &domainFilter.

Motivation

This addresses the discussion in #5522 where inconsistent receiver types were identified in the DomainFilter struct. Since UnmarshalJSON requires a pointer receiver, all other methods should use pointer receivers for consistency. This change prepares the codebase for enabling the recvcheck linter and improves overall code consistency.

More

  • [x] Yes, this PR title follows Conventional Commits
  • [ ] Yes, I added unit tests
  • [ ] Yes, I updated end user documentation accordingly

u-kai avatar Jun 20 '25 11:06 u-kai