Closed paddycarver closed 9 months ago
Attention: 196 lines
in your changes are missing coverage. Please review.
Comparison is base (
34fb9d9
) 81.61% compared to head (1098f60
) 81.61%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@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
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 !
in the title. This implies this is breaking, which I believe it is not (I don't consider deprecations breaking). Since everything should work transparently with the exception of compiler warnings around deprecations, I guess we can remove the !
? Otherwise our release automation will try to increment the package version to v2.0.0
.
What problem does this solve? It's good practice to use pkg
in golang
If you want to improve usability I would suggest remove the last part of the slug github.com/open-feature/go-sdk/pkg/openfeature
@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.