Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor: Use Go Generics for RecordConfig processing #3359

Merged
merged 17 commits into from
Jan 15, 2025

Conversation

tlimoncelli
Copy link
Contributor

@tlimoncelli tlimoncelli commented Jan 14, 2025

  • Use Generics to reduce code repetition
  • Split out the parser for each RecordType so they can be used in multiple places
  • Make CF_SINGLE_REDIRECT more like the other RecorTypes
  • Create MustImportFromLegacy() for use in testing.
  • More error checking
  • Replace PopulateFields*() with RecordUpdateFields()
  • RegisterType() -> MustRegisterType()
  • Add MustCreateRecord() for unit tests
  • Fix pkg/js/parse_tests/007-importTransformTTL.json (expected result was wrong!)
  • Change SetTarget() to SetTargetA() where possible

@tlimoncelli tlimoncelli changed the title use generics:try2 Refactor: Use Go Generics for RecordConfig processing Jan 14, 2025
@tlimoncelli tlimoncelli merged commit 79d02ee into branch_gorec Jan 15, 2025
20 checks passed
@tlimoncelli tlimoncelli deleted the branch_gorec_generics_try2 branch January 15, 2025 00: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.

1 participant