Skip to content

Conversation

@prestoalvarez
Copy link

Extract shared JSON marshaling logic into a private helper function to eliminate code duplication between StandardRegistry.MarshalJSON and PrefixedRegistry.MarshalJSON.

  • Both registry types had identical MarshalJSON implementations.
  • Duplication increases maintenance burden and risk of inconsistencies.
  • Common logic should be centralized to follow DRY principles.

  • Add private marshalRegistryJSON(r Registry) helper function.
  • Update both MarshalJSON methods to use the shared helper.

@fjl
Copy link
Contributor

fjl commented Oct 24, 2025

We prefer not to include this change.

@fjl fjl closed this Oct 24, 2025
@prestoalvarez prestoalvarez deleted the patch-3 branch October 24, 2025 15:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants