opentelemetry-collector
opentelemetry-collector copied to clipboard
Add testable documentation examples to featuregate package
This PR adds clear, testable documentation examples to the featuregate package. The examples demonstrate:
-
How to create a feature gate and print its properties.
-
How to register a feature gate in a custom registry, set its value, and visit all registered gates.
-
Updated doc.go with concise usage examples in Go doc comment format.
-
Added
example_test.gowith runnable Go example functions, ensuring the documentation is both visible on pkg.go.dev and verified bygo test.
These examples help new users understand how to use the featuregate API and ensure the documentation remains correct and up to date.!
The committers listed above are authorized under a signed CLA.
- :white_check_mark: login: parv18050212 / name: Parv Agarwal (d87ca40e7a7bf6cec93b254f2e08353b720cbc05, af3846d12dd83ebc80dd2e4313677fd290376fd6, f2f5acfd1cb3fbc6be385d77e6554335d6d6f21a, b6453e7fc152bbff70036e9fc6b8e9d1aad36f5f, 2ce60ea356cd9b8ff7fe336a50ee8c1d5d533d67, 626bf0641be463ff40b076d77c8e4d43aeebd9de, e38e58272a6a9d57b7603c86a94367d38ee704cb, 8e62aee3f2fbfde20e16f1d54f5468532d14da7c, c7869df33773dc5efff5cf5dfd979033edd9c215, 99996ce30e342009b0a2ad1e243e957ae9f0eb4f)
Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 91.58%. Comparing base (
6aa2b81) to head (626bf06). Report is 62 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #13159 +/- ##
==========================================
- Coverage 91.59% 91.58% -0.02%
==========================================
Files 522 522
Lines 29145 29145
==========================================
- Hits 26695 26691 -4
- Misses 1933 1936 +3
- Partials 517 518 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This PR was marked stale due to lack of activity. It will be closed in 14 days.
Could you fix the CI issues?
sure i am working on that
@dmathieu Hi, I’ve fixed all the CI-related issues The latest commit is pushed, and CI checks are currently pending. Just wanted to update you on the progress. Will monitor and make any changes if needed. Thanks!
@dmathieu workflows awaiting approval from the maintainers kindly approve the workflow
This PR was marked stale due to lack of activity. It will be closed in 14 days.