Skip to content

feat(context): add generic Value and ValueOr methods for Go 1.27 - #3075

Open
EricGusmao wants to merge 1 commit into
labstack:masterfrom
EricGusmao:feat/gen-methods-context
Open

feat(context): add generic Value and ValueOr methods for Go 1.27#3075
EricGusmao wants to merge 1 commit into
labstack:masterfrom
EricGusmao:feat/gen-methods-context

Conversation

@EricGusmao

Copy link
Copy Markdown
Contributor

Summary

  • Add Go 1.27-gated generic Context.Value and Context.ValueOr
    methods.
  • Refactor context lookups into shared helpers.
  • Preserve missing-key and invalid-type error behavior.
  • Add tests covering successful lookups, defaults, missing keys,
    invalid casts, and nil values.

@codecov

codecov Bot commented Aug 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.71%. Comparing base (dcb05f0) to head (3d4a795).
⚠️ Report is 11 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3075      +/-   ##
==========================================
+ Coverage   93.34%   95.71%   +2.36%     
==========================================
  Files          43       45       +2     
  Lines        4735     4039     -696     
==========================================
- Hits         4420     3866     -554     
+ Misses        192      173      -19     
+ Partials      123        0     -123     

☔ View full report in Codecov by Harness.
📢 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.

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.

1 participant