Skip to content
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

Move all files from pkg/openfeature to the root. #233

Closed
wants to merge 1 commit into from

Conversation

paddycarver
Copy link
Contributor

@paddycarver paddycarver commented Nov 15, 2023

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, 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 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.

The shortcoming of this import path is that goimports will struggle in some situations to be able to automatically add the import path based on the package name when it's used for the first time in a consumer package.

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@root) with no code changes or changes in behavior.

@paddycarver paddycarver requested a review from a team as a code owner November 15, 2023 06:59
Copy link
Contributor

github-actions bot commented Nov 15, 2023

Hey there and thank you for opening this pull request! 👋🏼

We require pull request titles to follow the Conventional Commits specification and it looks like your proposed title needs to be adjusted.

Details:

No release type found in pull request title "Move all files from pkg/openfeature to the root.". Add a prefix to indicate what kind of release this pull request corresponds to. For reference, see https://www.conventionalcommits.org/

Available types:
 - feat: A new feature
 - fix: A bug fix
 - docs: Documentation only changes
 - style: Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc)
 - refactor: A code change that neither fixes a bug nor adds a feature
 - perf: A code change that improves performance
 - test: Adding missing tests or correcting existing tests
 - build: Changes that affect the build system or external dependencies (example scopes: gulp, broccoli, npm)
 - ci: Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
 - chore: Other changes that don't modify src or test files
 - revert: Reverts a previous commit

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, 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
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.

The shortcoming of this import path is that goimports will struggle in
some situations to be able to automatically add the import path based on
the package name when it's used for the first time in a consumer
package.
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.

[FEATURE] Follow official Go guidance on how to organize a module?
1 participant