-
Notifications
You must be signed in to change notification settings - Fork 35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Move all files from pkg/openfeature to openfeature. #232
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #232 +/- ##
=======================================
Coverage 81.61% 81.61%
=======================================
Files 10 10
Lines 1142 1142
=======================================
Hits 932 932
Misses 192 192
Partials 18 18 ☔ View full report in Codecov by Sentry. |
@paddycarver thank you for the contribution and I like the approach proposed through this PR (compared to #233 with root level content) Could you please sign off your commit ? This guide should help you - https://github.com/open-feature/go-sdk/pull/232/checks?check_run_id=18694944964 |
Move the package from being github.com/open-feature/go-sdk/pkg/openfeature, which has an unnecessary pkg in the import path, to github.com/open-feature/go-sdk/openfeature, without the unnecessary "pkg" in the import path. The existing github.com/open-feature/go-sdk/pkg/openfeature package is now a compatibility shell; exported types, constants, variables, and functions are now aliased to the new github.com/open-feature/go-sdk/openfeature equivalents in a way that will pass equality checks, and types are interchangeable between both packages. No logic or tests live in the package anymore, only the exported identifiers, which call through to the new package for behavior. The memprovider package, similarly, has moved. Signed-off-by: Paddy Carver <paddy@carvers.com>
Should be done. :) |
@Kavindu-Dodan @paddycarver thanks so much for this change. I agreed very much with @craigpastro that the imports were not ideal, and I had already accepted that this would be a breaking change, so this was a welcome surprise! There's a |
What problem does this solve? It's good practice to use If you want to improve usability I would suggest remove the last part of the slug |
@AlexsJones, the reasoning was discussed in the linked issue. @paddycarver was able to introduce this change in a nonbreaking way. |
If we can make the change without breaking things 👍 |
This PR
Move the package from being
github.com/open-feature/go-sdk/pkg/openfeature, which has an unnecessary pkg in the import path, to github.com/open-feature/go-sdk/openfeature, without the unnecessary "pkg" in the import path.
The existing github.com/open-feature/go-sdk/pkg/openfeature package is now a compatibility shell; exported types, constants, variables, and functions are now aliased to the new
github.com/open-feature/go-sdk/openfeature equivalents in a way that will pass equality checks, and types are interchangeable between both packages. No logic or tests live in the package anymore, only the exported identifiers, which call through to the new package for behavior.
The memprovider package, similarly, has moved.
Related Issues
Fixes #227
How to test
Any consumers of the package that already exist should be able to transparently use this version (
go mod edit -replace github.com/open-feature/go-sdk=github.com/paddycarver/open-feature@no-pkg
) with no code changes or changes in behavior.