Skip to content

Commit

Permalink
Move all files from pkg/openfeature to the root.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
paddycarver committed Nov 15, 2023
1 parent 34fb9d9 commit 40d1079
Show file tree
Hide file tree
Showing 35 changed files with 2,033 additions and 1,349 deletions.
2 changes: 1 addition & 1 deletion pkg/openfeature/api.go → api.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"sync"

"github.com/go-logr/logr"
"github.com/open-feature/go-sdk/pkg/openfeature/internal"
"github.com/open-feature/go-sdk/internal"
"golang.org/x/exp/maps"
)

Expand Down
Loading

0 comments on commit 40d1079

Please sign in to comment.