feat: support libdns v1#2
Merged
Merged
Conversation
kmpm
commented
May 15, 2025
Collaborator
- update libdns interface to v1
- rework some logic
- optional logging
There was a problem hiding this comment.
Pull Request Overview
This PR updates the code to support libdns v1 while reworking some internal logic and adding optional logging.
- Updated file operations to use io.ReadAll/os.ReadFile.
- Refactored DNS record conversions and tests to align with the new libdns v1 types.
- Added an optional logger method and updated the go.mod dependency and Makefile targets.
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| server_test.go | Replaced deprecated file reading functions with updated ones in tests. |
| provider_test.go | Updated test cases to use new libdns record types; noted commented-out cases. |
| provider.go | Refactored record handling and added tracing for better debugging. |
| models.go | Updated DNS record conversion functions for libdns v1. |
| loopify.go / loopify_test.go | Removed obsolete loopify functions and corresponding tests. |
| logger.go | Added new logging method Infow for optional logging support. |
| go.mod | Upgraded the libdns dependency to v1.0.0. |
| _examples/acme-like/main.go | Adapted record creation for libdns v1. |
| _examples/acme-cleanup/main.go | Updated sample usage reflecting the refactored provider behavior. |
| Makefile | Added new tidy and audit targets for improved maintenance. |
Comments suppressed due to low confidence (2)
provider_test.go:171
- The valid deletion record test case is commented out, which may reduce test coverage for the DeleteRecords functionality. Consider reinstating or replacing this test case to ensure the behavior is adequately verified.
// {"valid records", tc.getProvider(), args{context.TODO(), "test.local", []libdns.Record{{Name: "test", ID: "12345"}}}, []libdns.Record{{Name: "test", ID: "12345"}}, false},
loopify_test.go:80
- The tests for loopifyRecords and unLoopifyRecords were removed, which might lower the coverage of domain transformation logic if that functionality is still used elsewhere. If these functions are still relevant, consider adding new tests to ensure their behavior remains correct.
/* Removal of loopifyRecords and unLoopifyRecords tests */
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.