Skip to content

Fix error message bug, improve docs and comments, expand test coverage - #3

Draft
KalleDK with Copilot wants to merge 1 commit into
mainfrom
copilot/improve-documentation-and-tests
Draft

Fix error message bug, improve docs and comments, expand test coverage#3
KalleDK with Copilot wants to merge 1 commit into
mainfrom
copilot/improve-documentation-and-tests

Conversation

Copilot AI commented Jul 16, 2026

Copy link
Copy Markdown

The repo had a copy-paste bug in an error message, sparse documentation, and limited test coverage.

Bug

  • UnmarshalCaddyfile: "API token already set""endpoint already set" when endpoint is supplied both inline and as a subdirective

Documentation

  • Added package-level doc comment linking the Caddy module to its libdns backing
  • Provision: comment now describes what it actually does (Caddy placeholder expansion)
  • UnmarshalCaddyfile: doc block shows all three valid syntax forms; notes credentials are optional
  • README: linked upstream ACMEProxy project, showed both Caddyfile endpoint forms, noted optional credentials, added {env.VAR} placeholder mention

Tests

  • Fixed mislabeled t.Errorf in test loop (Provider.CaddyModule()Provider.UnmarshalCaddyfile())
  • Added three UnmarshalCaddyfile cases: endpoint-only via inline arg + empty block, via subdirective, and bare inline arg with no block
  • Added TestProvider_CaddyModule covering module ID, non-nil New, and correct return type

Copilot AI changed the title Improve docs, fix error message bug, and add tests Fix error message bug, improve docs and comments, expand test coverage Jul 16, 2026
Copilot AI requested a review from KalleDK July 16, 2026 22:42
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