Skip to content

fix: export BasePool interface for correct godoc rendering#143

Merged
alitto merged 1 commit into
alitto:mainfrom
Yanhu007:fix/export-base-pool-interface
Apr 14, 2026
Merged

fix: export BasePool interface for correct godoc rendering#143
alitto merged 1 commit into
alitto:mainfrom
Yanhu007:fix/export-base-pool-interface

Conversation

@Yanhu007
Copy link
Copy Markdown
Contributor

Fixes #141

Problem

The private basePool interface is embedded in both Pool and ResultPool[R]. Due to a known Go doc limitation, methods from embedded private interfaces are omitted from the generated documentation on pkg.go.dev.

This means essential methods like RunningWorkers(), Stop(), StopAndWait(), etc. are invisible in the docs.

Fix

Rename basePoolBasePool (exported). This is a minor API addition (new exported type), not a breaking change — existing code embedding Pool or ResultPool continues to work.

Testing

All existing tests pass.

The private basePool interface embedded in Pool and ResultPool
causes go doc to omit all base methods from the generated
documentation. Export it as BasePool so the full API surface is
visible on pkg.go.dev.

Fixes alitto#141
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.74%. Comparing base (a2e34e8) to head (c7e6f20).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #143   +/-   ##
=======================================
  Coverage   95.74%   95.74%           
=======================================
  Files          11       11           
  Lines         611      611           
=======================================
  Hits          585      585           
  Misses         23       23           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@alitto alitto self-requested a review April 14, 2026 11:50
Copy link
Copy Markdown
Owner

@alitto alitto left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for sending this PR!

@alitto alitto merged commit e309c37 into alitto:main Apr 14, 2026
18 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.

Wrong docs because of private interface

2 participants