open-feature / go-sdk

Go SDK for OpenFeature
https://openfeature.dev
Apache License 2.0
126 stars 30 forks source link

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

Closed paddycarver closed 10 months ago

paddycarver commented 10 months ago

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.

github-actions[bot] commented 10 months ago

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