Skip to content

Refactor plugin to docplanner namespace with full project scaffolding CORE-384#1

Merged
rodrigoechaide merged 3 commits intomainfrom
refactor/docplanner-namespace
Mar 4, 2026
Merged

Refactor plugin to docplanner namespace with full project scaffolding CORE-384#1
rodrigoechaide merged 3 commits intomainfrom
refactor/docplanner-namespace

Conversation

@rodrigoechaide
Copy link
Contributor

@rodrigoechaide rodrigoechaide commented Mar 3, 2026

Summary

  • Migrated Go module from github.com/mdklapwijk/traefik-plugin-request-id to github.com/docplanner/requestid
  • Renamed main.go to requestid.go with idiomatic package name and refactored handler to a named struct with ServeHTTP method
  • Added unit tests (requestid_test.go) with 100% code coverage
  • Added Makefile with lint, test, vendor, and clean targets
  • Added .golangci.yml (v2 format, all linters enabled)
  • Added docker/ setup for local testing with Traefik (docker-compose + traefik static/dynamic config)
  • Added GitHub Actions CI workflow (lint + test)
  • Rewrote README.md with full configuration reference, Docker Compose instructions, and credits to the original author

Test plan

  • make test passes (8/8 tests, 100% coverage)
  • make lint passes (0 issues)
  • docker compose up in docker/ starts Traefik with the plugin loaded
  • curl -sv http://localhost:8888/ returns X-Request-ID header with a UUIDv4 value
  • CI workflow runs successfully on this PR

Migrate the module from github.com/mdklapwijk/traefik-plugin-request-id
to github.com/docplanner/requestid and restructure the project to follow
the same conventions as the header-map plugin.

Changes:
- Rename module to github.com/docplanner/requestid
- Rename main.go to requestid.go with idiomatic package name
- Refactor handler to named struct with ServeHTTP method
- Add unit tests with 100% coverage
- Add Makefile (lint, test, vendor, clean)
- Add .golangci.yml (v2 format, all linters enabled)
- Add docker/ setup for local testing with Traefik
- Add GitHub Actions CI workflow
- Rewrite README with configuration reference and credits
- Refresh vendor directory

Credits to github.com/mdklapwijk/traefik-plugin-request-id for the
original implementation.
@rodrigoechaide rodrigoechaide changed the base branch from master to main March 3, 2026 17:08
@rodrigoechaide rodrigoechaide requested a review from a team March 3, 2026 17:10
@rodrigoechaide rodrigoechaide changed the title Refactor plugin to docplanner namespace with full project scaffolding Refactor plugin to docplanner namespace with full project scaffolding CORE-384 Mar 3, 2026
@rodrigoechaide rodrigoechaide self-assigned this Mar 4, 2026
Copy link

@kolah kolah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@rodrigoechaide rodrigoechaide merged commit a3eeb10 into main Mar 4, 2026
2 checks passed
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