diff --git a/README.md b/README.md index 088245ae9..e4d00c32c 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,11 @@ Refer to the [Go SDK's developer documentation](https://docs.developers.optimize Requires Golang version: -- For v2: 1.21.0 or higher -- For < v2: 1.12 or higher +| SDK Version | Required Golang Version | +|--------------|--------------------------| +| v2.0.0 | 1.21.0 or higher | +| < v2.0.0 | 1.13 or higher | + ### Install the SDK diff --git a/examples/benchmark/main.go b/examples/benchmark/main.go index 74cddfd1c..41785ef90 100644 --- a/examples/benchmark/main.go +++ b/examples/benchmark/main.go @@ -9,9 +9,9 @@ import ( "github.com/pkg/profile" - "github.com/optimizely/go-sdk/pkg/client" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/client" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) func stressTest() { diff --git a/examples/main.go b/examples/main.go index db786345a..516230b80 100644 --- a/examples/main.go +++ b/examples/main.go @@ -7,10 +7,10 @@ import ( "fmt" "time" - optimizely "github.com/optimizely/go-sdk" - "github.com/optimizely/go-sdk/pkg/client" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" + optimizely "github.com/optimizely/go-sdk/v2" + "github.com/optimizely/go-sdk/v2/pkg/client" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) func main() { diff --git a/go.mod b/go.mod index 3694117e6..b6385c52a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/optimizely/go-sdk +module github.com/optimizely/go-sdk/v2 go 1.21.0 diff --git a/optimizely.go b/optimizely.go index db340eb06..7018bbdf2 100644 --- a/optimizely.go +++ b/optimizely.go @@ -17,8 +17,8 @@ package optimizely import ( - "github.com/optimizely/go-sdk/pkg/client" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/client" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // Client returns an OptimizelyClient instantiated with the given key and options diff --git a/pkg/client/client.go b/pkg/client/client.go index 33631e6ed..8c411b233 100644 --- a/pkg/client/client.go +++ b/pkg/client/client.go @@ -28,20 +28,20 @@ import ( "github.com/hashicorp/go-multierror" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/odp" - pkgOdpSegment "github.com/optimizely/go-sdk/pkg/odp/segment" - pkgOdpUtils "github.com/optimizely/go-sdk/pkg/odp/utils" - "github.com/optimizely/go-sdk/pkg/optimizelyjson" - "github.com/optimizely/go-sdk/pkg/tracing" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/odp" + pkgOdpSegment "github.com/optimizely/go-sdk/v2/pkg/odp/segment" + pkgOdpUtils "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/optimizelyjson" + "github.com/optimizely/go-sdk/v2/pkg/tracing" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) const ( diff --git a/pkg/client/client_test.go b/pkg/client/client_test.go index eb9a40f51..0bc37a6f2 100644 --- a/pkg/client/client_test.go +++ b/pkg/client/client_test.go @@ -29,18 +29,18 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/odp" - "github.com/optimizely/go-sdk/pkg/odp/segment" - pkgOdpUtils "github.com/optimizely/go-sdk/pkg/odp/utils" - "github.com/optimizely/go-sdk/pkg/tracing" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/odp" + "github.com/optimizely/go-sdk/v2/pkg/odp/segment" + pkgOdpUtils "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/tracing" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) func ValidProjectConfigManager() *MockProjectConfigManager { diff --git a/pkg/client/factory.go b/pkg/client/factory.go index 1f28e10d9..fd9d62ed1 100644 --- a/pkg/client/factory.go +++ b/pkg/client/factory.go @@ -22,18 +22,18 @@ import ( "errors" "time" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/metrics" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/odp" - pkgUtils "github.com/optimizely/go-sdk/pkg/odp/utils" - "github.com/optimizely/go-sdk/pkg/registry" - "github.com/optimizely/go-sdk/pkg/tracing" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/metrics" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/odp" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/registry" + "github.com/optimizely/go-sdk/v2/pkg/tracing" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) // OptimizelyFactory is used to customize and construct an instance of the OptimizelyClient. diff --git a/pkg/client/factory_test.go b/pkg/client/factory_test.go index dd6765519..3633659fd 100644 --- a/pkg/client/factory_test.go +++ b/pkg/client/factory_test.go @@ -27,20 +27,20 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/metrics" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/odp" - "github.com/optimizely/go-sdk/pkg/odp/cache" - pkgOdpEvent "github.com/optimizely/go-sdk/pkg/odp/event" - pkgOdpSegment "github.com/optimizely/go-sdk/pkg/odp/segment" - pkgOdpUtils "github.com/optimizely/go-sdk/pkg/odp/utils" - "github.com/optimizely/go-sdk/pkg/registry" - "github.com/optimizely/go-sdk/pkg/tracing" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/metrics" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/odp" + "github.com/optimizely/go-sdk/v2/pkg/odp/cache" + pkgOdpEvent "github.com/optimizely/go-sdk/v2/pkg/odp/event" + pkgOdpSegment "github.com/optimizely/go-sdk/v2/pkg/odp/segment" + pkgOdpUtils "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/registry" + "github.com/optimizely/go-sdk/v2/pkg/tracing" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) type MockRequester struct { diff --git a/pkg/client/fixtures_test.go b/pkg/client/fixtures_test.go index 109934085..12e8a855d 100644 --- a/pkg/client/fixtures_test.go +++ b/pkg/client/fixtures_test.go @@ -20,12 +20,12 @@ package client import ( "fmt" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/notification" "github.com/stretchr/testify/mock" ) diff --git a/pkg/client/optimizely_decision.go b/pkg/client/optimizely_decision.go index 719832ceb..588e7cb50 100644 --- a/pkg/client/optimizely_decision.go +++ b/pkg/client/optimizely_decision.go @@ -18,7 +18,7 @@ package client import ( - "github.com/optimizely/go-sdk/pkg/optimizelyjson" + "github.com/optimizely/go-sdk/v2/pkg/optimizelyjson" ) // OptimizelyDecision defines the decision returned by decide api. diff --git a/pkg/client/optimizely_decision_test.go b/pkg/client/optimizely_decision_test.go index fe2c06cb4..69139f398 100644 --- a/pkg/client/optimizely_decision_test.go +++ b/pkg/client/optimizely_decision_test.go @@ -20,7 +20,7 @@ import ( "errors" "testing" - "github.com/optimizely/go-sdk/pkg/optimizelyjson" + "github.com/optimizely/go-sdk/v2/pkg/optimizelyjson" "github.com/stretchr/testify/suite" ) diff --git a/pkg/client/optimizely_user_context.go b/pkg/client/optimizely_user_context.go index 05cedbce1..1b5922471 100644 --- a/pkg/client/optimizely_user_context.go +++ b/pkg/client/optimizely_user_context.go @@ -21,10 +21,10 @@ import ( "errors" "sync" - "github.com/optimizely/go-sdk/pkg/decide" - pkgDecision "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" - pkgOdpSegment "github.com/optimizely/go-sdk/pkg/odp/segment" + "github.com/optimizely/go-sdk/v2/pkg/decide" + pkgDecision "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" + pkgOdpSegment "github.com/optimizely/go-sdk/v2/pkg/odp/segment" ) // OptimizelyUserContext defines user contexts that the SDK will use to make decisions for. diff --git a/pkg/client/optimizely_user_context_odp_test.go b/pkg/client/optimizely_user_context_odp_test.go index 522831183..56082ed7e 100644 --- a/pkg/client/optimizely_user_context_odp_test.go +++ b/pkg/client/optimizely_user_context_odp_test.go @@ -26,11 +26,11 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp" - "github.com/optimizely/go-sdk/pkg/odp/event" - "github.com/optimizely/go-sdk/pkg/odp/segment" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp" + "github.com/optimizely/go-sdk/v2/pkg/odp/event" + "github.com/optimizely/go-sdk/v2/pkg/odp/segment" ) type OptimizelyUserContextODPTestSuite struct { diff --git a/pkg/client/optimizely_user_context_test.go b/pkg/client/optimizely_user_context_test.go index ed76c4fc0..e85fe676d 100644 --- a/pkg/client/optimizely_user_context_test.go +++ b/pkg/client/optimizely_user_context_test.go @@ -25,12 +25,12 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/optimizelyjson" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/optimizelyjson" ) var doOnce sync.Once // required since we only need to read datafile once diff --git a/pkg/config/datafileprojectconfig/config.go b/pkg/config/datafileprojectconfig/config.go index 925422b3b..c825cc62b 100644 --- a/pkg/config/datafileprojectconfig/config.go +++ b/pkg/config/datafileprojectconfig/config.go @@ -21,9 +21,9 @@ import ( "errors" "fmt" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/mappers" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/mappers" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) var datafileVersions = map[string]struct{}{ diff --git a/pkg/config/datafileprojectconfig/config_test.go b/pkg/config/datafileprojectconfig/config_test.go index 475fc0d59..3ed96665b 100644 --- a/pkg/config/datafileprojectconfig/config_test.go +++ b/pkg/config/datafileprojectconfig/config_test.go @@ -24,8 +24,8 @@ import ( "path/filepath" "testing" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/entities/entities.go b/pkg/config/datafileprojectconfig/entities/entities.go index 5ae123571..abc6e8dfa 100644 --- a/pkg/config/datafileprojectconfig/entities/entities.go +++ b/pkg/config/datafileprojectconfig/entities/entities.go @@ -17,7 +17,7 @@ // Package entities has entity definitions package entities -import "github.com/optimizely/go-sdk/pkg/entities" +import "github.com/optimizely/go-sdk/v2/pkg/entities" // Audience represents an Audience object from the Optimizely datafile type Audience struct { diff --git a/pkg/config/datafileprojectconfig/json_parser.go b/pkg/config/datafileprojectconfig/json_parser.go index 1df3e33c0..1bfa14892 100644 --- a/pkg/config/datafileprojectconfig/json_parser.go +++ b/pkg/config/datafileprojectconfig/json_parser.go @@ -18,9 +18,9 @@ package datafileprojectconfig import ( - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" - "github.com/json-iterator/go" + jsoniter "github.com/json-iterator/go" ) var json = jsoniter.ConfigCompatibleWithStandardLibrary diff --git a/pkg/config/datafileprojectconfig/json_parser_test.go b/pkg/config/datafileprojectconfig/json_parser_test.go index d27e96776..eeff1dd5c 100644 --- a/pkg/config/datafileprojectconfig/json_parser_test.go +++ b/pkg/config/datafileprojectconfig/json_parser_test.go @@ -21,7 +21,7 @@ import ( "os" "testing" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/attribute.go b/pkg/config/datafileprojectconfig/mappers/attribute.go index 915bd4ec4..3d0ad15bd 100644 --- a/pkg/config/datafileprojectconfig/mappers/attribute.go +++ b/pkg/config/datafileprojectconfig/mappers/attribute.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapAttributes maps the raw datafile attribute entities to SDK Attribute entities diff --git a/pkg/config/datafileprojectconfig/mappers/attribute_test.go b/pkg/config/datafileprojectconfig/mappers/attribute_test.go index 4eebc4b45..3cbcfebfc 100644 --- a/pkg/config/datafileprojectconfig/mappers/attribute_test.go +++ b/pkg/config/datafileprojectconfig/mappers/attribute_test.go @@ -19,8 +19,8 @@ package mappers import ( "testing" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/audience.go b/pkg/config/datafileprojectconfig/mappers/audience.go index 2a3eda2d1..7d638de01 100644 --- a/pkg/config/datafileprojectconfig/mappers/audience.go +++ b/pkg/config/datafileprojectconfig/mappers/audience.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapAudiences maps the raw datafile audience entities to SDK Audience entities diff --git a/pkg/config/datafileprojectconfig/mappers/audience_test.go b/pkg/config/datafileprojectconfig/mappers/audience_test.go index 51e2882da..53bde88c8 100644 --- a/pkg/config/datafileprojectconfig/mappers/audience_test.go +++ b/pkg/config/datafileprojectconfig/mappers/audience_test.go @@ -20,8 +20,8 @@ package mappers import ( "testing" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/condition_trees.go b/pkg/config/datafileprojectconfig/mappers/condition_trees.go index 849c3c1d5..8d56a86ca 100644 --- a/pkg/config/datafileprojectconfig/mappers/condition_trees.go +++ b/pkg/config/datafileprojectconfig/mappers/condition_trees.go @@ -22,8 +22,8 @@ import ( "reflect" jsoniter "github.com/json-iterator/go" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) var errEmptyTree = errors.New("empty tree") diff --git a/pkg/config/datafileprojectconfig/mappers/condition_trees_test.go b/pkg/config/datafileprojectconfig/mappers/condition_trees_test.go index 9bd18ca48..6e9323086 100644 --- a/pkg/config/datafileprojectconfig/mappers/condition_trees_test.go +++ b/pkg/config/datafileprojectconfig/mappers/condition_trees_test.go @@ -19,8 +19,8 @@ package mappers import ( "testing" - datafileConfig "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileConfig "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/events.go b/pkg/config/datafileprojectconfig/mappers/events.go index 63606ec2e..53ddbac70 100644 --- a/pkg/config/datafileprojectconfig/mappers/events.go +++ b/pkg/config/datafileprojectconfig/mappers/events.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapEvents maps the raw datafile event entities to SDK Event entities diff --git a/pkg/config/datafileprojectconfig/mappers/events_test.go b/pkg/config/datafileprojectconfig/mappers/events_test.go index 62f5788b4..075f71e59 100644 --- a/pkg/config/datafileprojectconfig/mappers/events_test.go +++ b/pkg/config/datafileprojectconfig/mappers/events_test.go @@ -19,8 +19,8 @@ package mappers import ( "testing" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/experiment.go b/pkg/config/datafileprojectconfig/mappers/experiment.go index e8efd8353..47d9544c4 100644 --- a/pkg/config/datafileprojectconfig/mappers/experiment.go +++ b/pkg/config/datafileprojectconfig/mappers/experiment.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapExperiments maps the raw experiments entities from the datafile to SDK Experiment entities and also returns a map of experiment key to experiment ID diff --git a/pkg/config/datafileprojectconfig/mappers/experiment_test.go b/pkg/config/datafileprojectconfig/mappers/experiment_test.go index 421c6a96c..a51088a2b 100644 --- a/pkg/config/datafileprojectconfig/mappers/experiment_test.go +++ b/pkg/config/datafileprojectconfig/mappers/experiment_test.go @@ -20,8 +20,8 @@ import ( "testing" jsoniter "github.com/json-iterator/go" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/feature.go b/pkg/config/datafileprojectconfig/mappers/feature.go index b7d1d3bf5..5514857c1 100644 --- a/pkg/config/datafileprojectconfig/mappers/feature.go +++ b/pkg/config/datafileprojectconfig/mappers/feature.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapFeatures maps the raw datafile feature flag entities to SDK Feature entities diff --git a/pkg/config/datafileprojectconfig/mappers/feature_test.go b/pkg/config/datafileprojectconfig/mappers/feature_test.go index d02eb9341..b5dc54ba8 100644 --- a/pkg/config/datafileprojectconfig/mappers/feature_test.go +++ b/pkg/config/datafileprojectconfig/mappers/feature_test.go @@ -20,8 +20,8 @@ import ( "testing" jsoniter "github.com/json-iterator/go" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/forced_decision.go b/pkg/config/datafileprojectconfig/mappers/forced_decision.go index e7fe0eeb4..164f510cf 100644 --- a/pkg/config/datafileprojectconfig/mappers/forced_decision.go +++ b/pkg/config/datafileprojectconfig/mappers/forced_decision.go @@ -18,7 +18,7 @@ package mappers import ( - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapFlagVariations all variations for each flag diff --git a/pkg/config/datafileprojectconfig/mappers/group.go b/pkg/config/datafileprojectconfig/mappers/group.go index ab9949470..dfa5ef2bd 100644 --- a/pkg/config/datafileprojectconfig/mappers/group.go +++ b/pkg/config/datafileprojectconfig/mappers/group.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapGroups maps the raw group entity from the datafile to an SDK Group entity diff --git a/pkg/config/datafileprojectconfig/mappers/group_test.go b/pkg/config/datafileprojectconfig/mappers/group_test.go index 6fed98fdb..4695cb340 100644 --- a/pkg/config/datafileprojectconfig/mappers/group_test.go +++ b/pkg/config/datafileprojectconfig/mappers/group_test.go @@ -19,8 +19,8 @@ package mappers import ( "testing" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/datafileprojectconfig/mappers/rollout.go b/pkg/config/datafileprojectconfig/mappers/rollout.go index 4e5f110d5..786e87c7d 100644 --- a/pkg/config/datafileprojectconfig/mappers/rollout.go +++ b/pkg/config/datafileprojectconfig/mappers/rollout.go @@ -18,8 +18,8 @@ package mappers import ( - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // MapRollouts maps the raw datafile rollout entities to SDK Rollout entities diff --git a/pkg/config/datafileprojectconfig/mappers/rollout_test.go b/pkg/config/datafileprojectconfig/mappers/rollout_test.go index 373dcb274..c4f29f119 100644 --- a/pkg/config/datafileprojectconfig/mappers/rollout_test.go +++ b/pkg/config/datafileprojectconfig/mappers/rollout_test.go @@ -19,8 +19,8 @@ package mappers import ( "testing" - datafileEntities "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/entities" - "github.com/optimizely/go-sdk/pkg/entities" + datafileEntities "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/config/interface.go b/pkg/config/interface.go index 3e74078c2..e6ee97769 100644 --- a/pkg/config/interface.go +++ b/pkg/config/interface.go @@ -18,8 +18,8 @@ package config import ( - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) // ProjectConfig represents the project's experiments and feature flags and contains methods for accessing the them. diff --git a/pkg/config/optimizely_config.go b/pkg/config/optimizely_config.go index 691b26fb1..289e90e69 100644 --- a/pkg/config/optimizely_config.go +++ b/pkg/config/optimizely_config.go @@ -22,8 +22,8 @@ import ( "fmt" "strings" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig/mappers" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig/mappers" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // OptimizelyConfig is a snapshot of the experiments and features in the project config diff --git a/pkg/config/polling_manager.go b/pkg/config/polling_manager.go index 1b2068b5a..654bba4e9 100644 --- a/pkg/config/polling_manager.go +++ b/pkg/config/polling_manager.go @@ -24,11 +24,11 @@ import ( "sync" "time" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/registry" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/registry" + "github.com/optimizely/go-sdk/v2/pkg/utils" "github.com/pkg/errors" ) diff --git a/pkg/config/polling_manager_test.go b/pkg/config/polling_manager_test.go index 8e2b4a900..96673ed88 100644 --- a/pkg/config/polling_manager_test.go +++ b/pkg/config/polling_manager_test.go @@ -23,10 +23,10 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/utils" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/config/static_manager.go b/pkg/config/static_manager.go index 582e0968e..3540b44b7 100644 --- a/pkg/config/static_manager.go +++ b/pkg/config/static_manager.go @@ -22,10 +22,10 @@ import ( "fmt" "sync" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) // StaticProjectConfigManager maintains a static copy of the project config diff --git a/pkg/config/static_manager_test.go b/pkg/config/static_manager_test.go index 569ad0c84..b318f3867 100644 --- a/pkg/config/static_manager_test.go +++ b/pkg/config/static_manager_test.go @@ -20,9 +20,9 @@ import ( "errors" "testing" - "github.com/optimizely/go-sdk/pkg/config/datafileprojectconfig" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/config/datafileprojectconfig" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" "github.com/stretchr/testify/assert" ) diff --git a/pkg/decision/bucketer/experiment_bucketer.go b/pkg/decision/bucketer/experiment_bucketer.go index 13c17f426..14c31be8b 100644 --- a/pkg/decision/bucketer/experiment_bucketer.go +++ b/pkg/decision/bucketer/experiment_bucketer.go @@ -18,9 +18,9 @@ package bucketer import ( - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExperimentBucketer is used to bucket the user into a particular entity in the experiment's traffic alloc range diff --git a/pkg/decision/bucketer/experiment_bucketer_test.go b/pkg/decision/bucketer/experiment_bucketer_test.go index 8ec61b880..91c3f2a6a 100644 --- a/pkg/decision/bucketer/experiment_bucketer_test.go +++ b/pkg/decision/bucketer/experiment_bucketer_test.go @@ -1,12 +1,13 @@ package bucketer import ( - "github.com/optimizely/go-sdk/pkg/logging" "testing" - "github.com/optimizely/go-sdk/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/logging" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/decision/bucketer/murmurhashbucketer.go b/pkg/decision/bucketer/murmurhashbucketer.go index 879b00e14..c2667ff38 100644 --- a/pkg/decision/bucketer/murmurhashbucketer.go +++ b/pkg/decision/bucketer/murmurhashbucketer.go @@ -21,8 +21,8 @@ import ( "fmt" "math" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/twmb/murmur3" ) diff --git a/pkg/decision/bucketer/murmurhashbucketer_test.go b/pkg/decision/bucketer/murmurhashbucketer_test.go index 3db47c552..273aaa792 100644 --- a/pkg/decision/bucketer/murmurhashbucketer_test.go +++ b/pkg/decision/bucketer/murmurhashbucketer_test.go @@ -2,10 +2,11 @@ package bucketer import ( "fmt" - "github.com/optimizely/go-sdk/pkg/logging" "testing" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" + + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/assert" ) diff --git a/pkg/decision/composite_experiment_service.go b/pkg/decision/composite_experiment_service.go index 3f33a9f1b..d9069dfb1 100644 --- a/pkg/decision/composite_experiment_service.go +++ b/pkg/decision/composite_experiment_service.go @@ -18,9 +18,9 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // CESOptionFunc is used to assign optional configuration options diff --git a/pkg/decision/composite_experiment_service_test.go b/pkg/decision/composite_experiment_service_test.go index 38704c16f..3960be0a8 100644 --- a/pkg/decision/composite_experiment_service_test.go +++ b/pkg/decision/composite_experiment_service_test.go @@ -22,9 +22,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type CompositeExperimentTestSuite struct { diff --git a/pkg/decision/composite_feature_service.go b/pkg/decision/composite_feature_service.go index 1bd0925f2..24cba50ee 100644 --- a/pkg/decision/composite_feature_service.go +++ b/pkg/decision/composite_feature_service.go @@ -18,9 +18,9 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // CompositeFeatureService is the default out-of-the-box feature decision service diff --git a/pkg/decision/composite_feature_service_test.go b/pkg/decision/composite_feature_service_test.go index 513750983..acfbd9e5e 100644 --- a/pkg/decision/composite_feature_service_test.go +++ b/pkg/decision/composite_feature_service_test.go @@ -20,10 +20,10 @@ import ( "errors" "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/composite_service.go b/pkg/decision/composite_service.go index 78891820d..18e0614b9 100644 --- a/pkg/decision/composite_service.go +++ b/pkg/decision/composite_service.go @@ -20,11 +20,11 @@ package decision import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/registry" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/registry" ) // CompositeService is the entry-point into the decision service. It provides out of the box decision making for Features and Experiments. diff --git a/pkg/decision/composite_service_test.go b/pkg/decision/composite_service_test.go index 59196f2a7..a2960ae7b 100644 --- a/pkg/decision/composite_service_test.go +++ b/pkg/decision/composite_service_test.go @@ -21,9 +21,9 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) type CompositeServiceFeatureTestSuite struct { diff --git a/pkg/decision/entities.go b/pkg/decision/entities.go index 10884ac9f..63139329d 100644 --- a/pkg/decision/entities.go +++ b/pkg/decision/entities.go @@ -18,9 +18,9 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // ExperimentDecisionContext contains the information needed to be able to make a decision for a given experiment diff --git a/pkg/decision/evaluator/condition.go b/pkg/decision/evaluator/condition.go index 60301d1d3..10195afcd 100644 --- a/pkg/decision/evaluator/condition.go +++ b/pkg/decision/evaluator/condition.go @@ -21,10 +21,10 @@ import ( "errors" "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ItemEvaluator evaluates a condition against the given user's attributes diff --git a/pkg/decision/evaluator/condition_test.go b/pkg/decision/evaluator/condition_test.go index 90ea9ce42..1b011037c 100644 --- a/pkg/decision/evaluator/condition_test.go +++ b/pkg/decision/evaluator/condition_test.go @@ -20,10 +20,10 @@ import ( "fmt" "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/evaluator/condition_tree.go b/pkg/decision/evaluator/condition_tree.go index 3f546ceef..41ab3681b 100644 --- a/pkg/decision/evaluator/condition_tree.go +++ b/pkg/decision/evaluator/condition_tree.go @@ -20,9 +20,9 @@ package evaluator import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // String constant representing custom attribute condition type. diff --git a/pkg/decision/evaluator/condition_tree_test.go b/pkg/decision/evaluator/condition_tree_test.go index c349e590b..cddfbff6c 100644 --- a/pkg/decision/evaluator/condition_tree_test.go +++ b/pkg/decision/evaluator/condition_tree_test.go @@ -23,9 +23,9 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/decide" - e "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + e "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type MockLogger struct { diff --git a/pkg/decision/evaluator/matchers/exact.go b/pkg/decision/evaluator/matchers/exact.go index 42e498a65..295f684a0 100644 --- a/pkg/decision/evaluator/matchers/exact.go +++ b/pkg/decision/evaluator/matchers/exact.go @@ -20,9 +20,9 @@ package matchers import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers/utils" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers/utils" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExactMatcher matches against the "exact" match type diff --git a/pkg/decision/evaluator/matchers/exact_test.go b/pkg/decision/evaluator/matchers/exact_test.go index 68c78b92d..8f99b42fa 100644 --- a/pkg/decision/evaluator/matchers/exact_test.go +++ b/pkg/decision/evaluator/matchers/exact_test.go @@ -23,8 +23,8 @@ import ( "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type MockLogger struct { diff --git a/pkg/decision/evaluator/matchers/exists.go b/pkg/decision/evaluator/matchers/exists.go index f3e7f4d68..b7ac52fc2 100644 --- a/pkg/decision/evaluator/matchers/exists.go +++ b/pkg/decision/evaluator/matchers/exists.go @@ -18,8 +18,8 @@ package matchers import ( - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExistsMatcher matches against the "exists" match type diff --git a/pkg/decision/evaluator/matchers/exists_test.go b/pkg/decision/evaluator/matchers/exists_test.go index 8bb728ee4..602012049 100644 --- a/pkg/decision/evaluator/matchers/exists_test.go +++ b/pkg/decision/evaluator/matchers/exists_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) var existsMatcher, _ = Get(ExistsMatchType) diff --git a/pkg/decision/evaluator/matchers/ge.go b/pkg/decision/evaluator/matchers/ge.go index ba232f0d6..6f059d758 100644 --- a/pkg/decision/evaluator/matchers/ge.go +++ b/pkg/decision/evaluator/matchers/ge.go @@ -20,10 +20,10 @@ package matchers import ( "fmt" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers/utils" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers/utils" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // GeMatcher matches against the "ge" match type diff --git a/pkg/decision/evaluator/matchers/ge_test.go b/pkg/decision/evaluator/matchers/ge_test.go index d0a2df15f..359eda4de 100644 --- a/pkg/decision/evaluator/matchers/ge_test.go +++ b/pkg/decision/evaluator/matchers/ge_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) var geMatcher, _ = Get(GeMatchType) diff --git a/pkg/decision/evaluator/matchers/gt.go b/pkg/decision/evaluator/matchers/gt.go index 3e27b1357..bdb0e3ce9 100644 --- a/pkg/decision/evaluator/matchers/gt.go +++ b/pkg/decision/evaluator/matchers/gt.go @@ -20,9 +20,9 @@ package matchers import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers/utils" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers/utils" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // GtMatcher matches against the "gt" match type diff --git a/pkg/decision/evaluator/matchers/gt_test.go b/pkg/decision/evaluator/matchers/gt_test.go index adaa1f148..4ae92baca 100644 --- a/pkg/decision/evaluator/matchers/gt_test.go +++ b/pkg/decision/evaluator/matchers/gt_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type GtTestSuite struct { diff --git a/pkg/decision/evaluator/matchers/le.go b/pkg/decision/evaluator/matchers/le.go index 96d2c8c85..231df4d9d 100644 --- a/pkg/decision/evaluator/matchers/le.go +++ b/pkg/decision/evaluator/matchers/le.go @@ -20,10 +20,10 @@ package matchers import ( "fmt" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" - "github.com/optimizely/go-sdk/pkg/decision/evaluator/matchers/utils" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator/matchers/utils" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // LeMatcher matches against the "le" match type diff --git a/pkg/decision/evaluator/matchers/le_test.go b/pkg/decision/evaluator/matchers/le_test.go index 10f9d1167..fb4a4b41c 100644 --- a/pkg/decision/evaluator/matchers/le_test.go +++ b/pkg/decision/evaluator/matchers/le_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) var leMatcher, _ = Get(LeMatchType) diff --git a/pkg/decision/evaluator/matchers/lt.go b/pkg/decision/evaluator/matchers/lt.go index a01cc563d..a7631fc3a 100644 --- a/pkg/decision/evaluator/matchers/lt.go +++ b/pkg/decision/evaluator/matchers/lt.go @@ -18,8 +18,8 @@ package matchers import ( - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // LtMatcher matches against the "lt" match type diff --git a/pkg/decision/evaluator/matchers/lt_test.go b/pkg/decision/evaluator/matchers/lt_test.go index ae6cb2b20..34adba58d 100644 --- a/pkg/decision/evaluator/matchers/lt_test.go +++ b/pkg/decision/evaluator/matchers/lt_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type LtTestSuite struct { diff --git a/pkg/decision/evaluator/matchers/qualified.go b/pkg/decision/evaluator/matchers/qualified.go index 5f9f1dbe7..9d964c1ae 100644 --- a/pkg/decision/evaluator/matchers/qualified.go +++ b/pkg/decision/evaluator/matchers/qualified.go @@ -20,8 +20,8 @@ package matchers import ( "fmt" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // QualifiedMatcher matches against the "qualified" match type diff --git a/pkg/decision/evaluator/matchers/qualified_test.go b/pkg/decision/evaluator/matchers/qualified_test.go index af72bc5b0..495402c47 100644 --- a/pkg/decision/evaluator/matchers/qualified_test.go +++ b/pkg/decision/evaluator/matchers/qualified_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type QualifiedTestSuite struct { diff --git a/pkg/decision/evaluator/matchers/registry.go b/pkg/decision/evaluator/matchers/registry.go index 5c71170f4..9ac5c19ef 100644 --- a/pkg/decision/evaluator/matchers/registry.go +++ b/pkg/decision/evaluator/matchers/registry.go @@ -20,8 +20,8 @@ package matchers import ( "sync" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // Matcher type is used to evaluate audience conditional primitives diff --git a/pkg/decision/evaluator/matchers/registry_test.go b/pkg/decision/evaluator/matchers/registry_test.go index 20d065169..fb30ed3c5 100644 --- a/pkg/decision/evaluator/matchers/registry_test.go +++ b/pkg/decision/evaluator/matchers/registry_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) func TestRegister(t *testing.T) { diff --git a/pkg/decision/evaluator/matchers/semver.go b/pkg/decision/evaluator/matchers/semver.go index e0ae62d5c..b9deaaf2c 100644 --- a/pkg/decision/evaluator/matchers/semver.go +++ b/pkg/decision/evaluator/matchers/semver.go @@ -23,10 +23,10 @@ import ( "strconv" "strings" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/pkg/errors" ) diff --git a/pkg/decision/evaluator/matchers/semver_test.go b/pkg/decision/evaluator/matchers/semver_test.go index 6fc79e813..e3bafa0c6 100644 --- a/pkg/decision/evaluator/matchers/semver_test.go +++ b/pkg/decision/evaluator/matchers/semver_test.go @@ -21,7 +21,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) func TestValidAttributes(t *testing.T) { diff --git a/pkg/decision/evaluator/matchers/substring.go b/pkg/decision/evaluator/matchers/substring.go index ed1de1ad9..2ffdbacc3 100644 --- a/pkg/decision/evaluator/matchers/substring.go +++ b/pkg/decision/evaluator/matchers/substring.go @@ -21,8 +21,8 @@ import ( "fmt" "strings" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // SubstringMatcher matches against the "substring" match type diff --git a/pkg/decision/evaluator/matchers/substring_test.go b/pkg/decision/evaluator/matchers/substring_test.go index 42446631c..a117a1a7c 100644 --- a/pkg/decision/evaluator/matchers/substring_test.go +++ b/pkg/decision/evaluator/matchers/substring_test.go @@ -22,8 +22,8 @@ import ( "github.com/stretchr/testify/suite" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) type SubstringTestSuite struct { diff --git a/pkg/decision/experiment_bucketer_service.go b/pkg/decision/experiment_bucketer_service.go index c45fd9bf7..0dd578262 100644 --- a/pkg/decision/experiment_bucketer_service.go +++ b/pkg/decision/experiment_bucketer_service.go @@ -20,12 +20,12 @@ package decision import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/bucketer" - "github.com/optimizely/go-sdk/pkg/decision/evaluator" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/bucketer" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExperimentBucketerService makes a decision using the experiment bucketer diff --git a/pkg/decision/experiment_bucketer_service_test.go b/pkg/decision/experiment_bucketer_service_test.go index 374fe2730..1c1be81a5 100644 --- a/pkg/decision/experiment_bucketer_service_test.go +++ b/pkg/decision/experiment_bucketer_service_test.go @@ -20,11 +20,11 @@ import ( "fmt" "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/logging" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/experiment_override_service.go b/pkg/decision/experiment_override_service.go index 3266f3a06..290af09ba 100644 --- a/pkg/decision/experiment_override_service.go +++ b/pkg/decision/experiment_override_service.go @@ -22,10 +22,10 @@ import ( "fmt" "sync" - "github.com/optimizely/go-sdk/pkg/decide" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExperimentOverrideKey represents the user ID and experiment associated with an override variation diff --git a/pkg/decision/experiment_override_service_test.go b/pkg/decision/experiment_override_service_test.go index d1fa7cf57..cfa38d3aa 100644 --- a/pkg/decision/experiment_override_service_test.go +++ b/pkg/decision/experiment_override_service_test.go @@ -21,10 +21,10 @@ import ( "sync" "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/experiment_whitelist_service.go b/pkg/decision/experiment_whitelist_service.go index b05dba1a8..ad2d614e6 100644 --- a/pkg/decision/experiment_whitelist_service.go +++ b/pkg/decision/experiment_whitelist_service.go @@ -20,9 +20,9 @@ package decision import ( "errors" - "github.com/optimizely/go-sdk/pkg/decide" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decide" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // ExperimentWhitelistService makes a decision using an experiment's whitelist (a map of user id to variation keys) diff --git a/pkg/decision/experiment_whitelist_service_test.go b/pkg/decision/experiment_whitelist_service_test.go index 508084df1..598a4fd3b 100644 --- a/pkg/decision/experiment_whitelist_service_test.go +++ b/pkg/decision/experiment_whitelist_service_test.go @@ -20,9 +20,9 @@ package decision import ( "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/feature_experiment_service.go b/pkg/decision/feature_experiment_service.go index e8c8e0ab8..e9f07ec62 100644 --- a/pkg/decision/feature_experiment_service.go +++ b/pkg/decision/feature_experiment_service.go @@ -20,9 +20,9 @@ package decision import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // FeatureExperimentService helps evaluate feature test associated with the feature diff --git a/pkg/decision/feature_experiment_service_test.go b/pkg/decision/feature_experiment_service_test.go index f08961bfe..d7160d568 100644 --- a/pkg/decision/feature_experiment_service_test.go +++ b/pkg/decision/feature_experiment_service_test.go @@ -19,9 +19,9 @@ package decision import ( "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/feature_notification.go b/pkg/decision/feature_notification.go index 39fbf4f5d..fdb856c45 100644 --- a/pkg/decision/feature_notification.go +++ b/pkg/decision/feature_notification.go @@ -18,8 +18,8 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) // FeatureNotificationWithVariables constructs feature notification with variables diff --git a/pkg/decision/feature_notification_test.go b/pkg/decision/feature_notification_test.go index c75d22081..577fe7aa6 100644 --- a/pkg/decision/feature_notification_test.go +++ b/pkg/decision/feature_notification_test.go @@ -20,8 +20,8 @@ package decision import ( "testing" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" "github.com/stretchr/testify/assert" ) diff --git a/pkg/decision/flag_notification.go b/pkg/decision/flag_notification.go index a4c718fe5..6d6030a49 100644 --- a/pkg/decision/flag_notification.go +++ b/pkg/decision/flag_notification.go @@ -18,8 +18,8 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) // FlagNotification constructs default flag notification diff --git a/pkg/decision/forced_decision_service.go b/pkg/decision/forced_decision_service.go index 50fc9379c..0f5fd1f1d 100644 --- a/pkg/decision/forced_decision_service.go +++ b/pkg/decision/forced_decision_service.go @@ -21,9 +21,9 @@ import ( "errors" "sync" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // OptimizelyDecisionContext defines Decision Context diff --git a/pkg/decision/forced_decision_service_test.go b/pkg/decision/forced_decision_service_test.go index b6b9ae312..ddb813709 100644 --- a/pkg/decision/forced_decision_service_test.go +++ b/pkg/decision/forced_decision_service_test.go @@ -24,8 +24,8 @@ import ( "sync" "testing" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" "github.com/stretchr/testify/suite" ) diff --git a/pkg/decision/helpers_test.go b/pkg/decision/helpers_test.go index 70cc44419..56a7e1687 100644 --- a/pkg/decision/helpers_test.go +++ b/pkg/decision/helpers_test.go @@ -22,9 +22,9 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/mock" ) diff --git a/pkg/decision/interface.go b/pkg/decision/interface.go index ec5a4cadc..ae45db515 100644 --- a/pkg/decision/interface.go +++ b/pkg/decision/interface.go @@ -18,9 +18,9 @@ package decision import ( - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) // Service interface is used to make a decision for a given feature or experiment diff --git a/pkg/decision/persisting_experiment_service.go b/pkg/decision/persisting_experiment_service.go index 6055c8f3b..b27f8414b 100644 --- a/pkg/decision/persisting_experiment_service.go +++ b/pkg/decision/persisting_experiment_service.go @@ -20,9 +20,9 @@ package decision import ( "fmt" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // PersistingExperimentService attempts to retrieve a saved decision from the user profile service diff --git a/pkg/decision/persisting_experiment_service_test.go b/pkg/decision/persisting_experiment_service_test.go index f9fa47c1f..d3fc21f92 100644 --- a/pkg/decision/persisting_experiment_service_test.go +++ b/pkg/decision/persisting_experiment_service_test.go @@ -20,9 +20,9 @@ package decision import ( "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" diff --git a/pkg/decision/rollout_service.go b/pkg/decision/rollout_service.go index e42a18693..13c1402c2 100644 --- a/pkg/decision/rollout_service.go +++ b/pkg/decision/rollout_service.go @@ -21,11 +21,11 @@ import ( "fmt" "strconv" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/evaluator" - pkgReasons "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator" + pkgReasons "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // RolloutService makes a feature decision for a given feature rollout diff --git a/pkg/decision/rollout_service_test.go b/pkg/decision/rollout_service_test.go index 9bf160dbc..70cd20b03 100644 --- a/pkg/decision/rollout_service_test.go +++ b/pkg/decision/rollout_service_test.go @@ -20,11 +20,11 @@ import ( "fmt" "testing" - "github.com/optimizely/go-sdk/pkg/decide" - "github.com/optimizely/go-sdk/pkg/decision/evaluator" - "github.com/optimizely/go-sdk/pkg/decision/reasons" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/decide" + "github.com/optimizely/go-sdk/v2/pkg/decision/evaluator" + "github.com/optimizely/go-sdk/v2/pkg/decision/reasons" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/entities/user_context.go b/pkg/entities/user_context.go index 99e54544a..881f4fd91 100644 --- a/pkg/entities/user_context.go +++ b/pkg/entities/user_context.go @@ -20,7 +20,7 @@ package entities import ( "fmt" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) const bucketingIDAttributeName = "$opt_bucketing_id" diff --git a/pkg/event/dispatcher.go b/pkg/event/dispatcher.go index 987990359..8d01c79ed 100644 --- a/pkg/event/dispatcher.go +++ b/pkg/event/dispatcher.go @@ -25,9 +25,9 @@ import ( "golang.org/x/sync/semaphore" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/metrics" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/metrics" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) const maxWorkers = int64(1) diff --git a/pkg/event/dispatcher_test.go b/pkg/event/dispatcher_test.go index a3c4e07c9..f3af38952 100644 --- a/pkg/event/dispatcher_test.go +++ b/pkg/event/dispatcher_test.go @@ -22,8 +22,8 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/metrics" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/metrics" "github.com/stretchr/testify/assert" ) diff --git a/pkg/event/factory.go b/pkg/event/factory.go index a0de25f9a..c15369711 100644 --- a/pkg/event/factory.go +++ b/pkg/event/factory.go @@ -24,10 +24,10 @@ import ( guuid "github.com/google/uuid" - "github.com/optimizely/go-sdk/pkg/config" - decisionPkg "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/config" + decisionPkg "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) const impressionKey string = "campaign_activated" diff --git a/pkg/event/factory_test.go b/pkg/event/factory_test.go index 04df215bd..ea4ed82dd 100644 --- a/pkg/event/factory_test.go +++ b/pkg/event/factory_test.go @@ -25,9 +25,9 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/config" - "github.com/optimizely/go-sdk/pkg/decision" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/config" + "github.com/optimizely/go-sdk/v2/pkg/decision" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) var testExperiment = entities.Experiment{ diff --git a/pkg/event/processor.go b/pkg/event/processor.go index f1727d9c7..4cefda214 100644 --- a/pkg/event/processor.go +++ b/pkg/event/processor.go @@ -26,10 +26,10 @@ import ( "golang.org/x/sync/semaphore" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/metrics" - "github.com/optimizely/go-sdk/pkg/notification" - "github.com/optimizely/go-sdk/pkg/registry" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/metrics" + "github.com/optimizely/go-sdk/v2/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/registry" ) // Processor processes events diff --git a/pkg/event/processor_test.go b/pkg/event/processor_test.go index 15b346d28..5f5fd1580 100644 --- a/pkg/event/processor_test.go +++ b/pkg/event/processor_test.go @@ -27,8 +27,8 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/utils" ) type CountingDispatcher struct { diff --git a/pkg/event/queue.go b/pkg/event/queue.go index d8470f60a..33715808d 100644 --- a/pkg/event/queue.go +++ b/pkg/event/queue.go @@ -20,7 +20,7 @@ package event import ( "sync" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // Queue represents a queue diff --git a/pkg/notification/center.go b/pkg/notification/center.go index dd6abbfd6..08772fe47 100644 --- a/pkg/notification/center.go +++ b/pkg/notification/center.go @@ -19,7 +19,8 @@ package notification import ( "fmt" - "github.com/optimizely/go-sdk/pkg/logging" + + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // Center handles all notification listeners. It keeps track of the Manager for each type of notification. diff --git a/pkg/notification/center_test.go b/pkg/notification/center_test.go index 169f7367f..40e85a3e6 100644 --- a/pkg/notification/center_test.go +++ b/pkg/notification/center_test.go @@ -5,7 +5,7 @@ import ( "github.com/stretchr/testify/assert" - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" "github.com/stretchr/testify/mock" ) diff --git a/pkg/notification/entities.go b/pkg/notification/entities.go index edb801c9c..46fc7f207 100644 --- a/pkg/notification/entities.go +++ b/pkg/notification/entities.go @@ -18,7 +18,7 @@ package notification import ( - "github.com/optimizely/go-sdk/pkg/entities" + "github.com/optimizely/go-sdk/v2/pkg/entities" ) // Type is the type of notification diff --git a/pkg/notification/manager.go b/pkg/notification/manager.go index 919d59930..8ae6b148b 100644 --- a/pkg/notification/manager.go +++ b/pkg/notification/manager.go @@ -22,7 +22,7 @@ import ( "sync" "sync/atomic" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // Manager is a generic interface for managing notifications of a particular type diff --git a/pkg/notification/manager_test.go b/pkg/notification/manager_test.go index 7c3a0f773..ebcd9ad4f 100644 --- a/pkg/notification/manager_test.go +++ b/pkg/notification/manager_test.go @@ -3,7 +3,7 @@ package notification import ( "testing" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/mock" diff --git a/pkg/odp/config/config.go b/pkg/odp/config/config.go index ee865f648..d26d844b2 100644 --- a/pkg/odp/config/config.go +++ b/pkg/odp/config/config.go @@ -20,7 +20,7 @@ package config import ( "sync" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" ) // Config is used to represent odp config diff --git a/pkg/odp/event/event_api_manager.go b/pkg/odp/event/event_api_manager.go index e05a55ae6..128ec562d 100644 --- a/pkg/odp/event/event_api_manager.go +++ b/pkg/odp/event/event_api_manager.go @@ -21,9 +21,9 @@ import ( "fmt" "net/url" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/utils" - pkgUtils "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/utils" ) // APIManager represents the event API manager. diff --git a/pkg/odp/event/event_api_manager_test.go b/pkg/odp/event/event_api_manager_test.go index 29e580bf4..355e9a376 100644 --- a/pkg/odp/event/event_api_manager_test.go +++ b/pkg/odp/event/event_api_manager_test.go @@ -26,8 +26,8 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/odp/utils" - pkgUtils "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/utils" "github.com/stretchr/testify/suite" ) diff --git a/pkg/odp/event/event_manager.go b/pkg/odp/event/event_manager.go index 11a2ef8ae..18dbad1fd 100644 --- a/pkg/odp/event/event_manager.go +++ b/pkg/odp/event/event_manager.go @@ -26,10 +26,10 @@ import ( "time" guuid "github.com/google/uuid" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/config" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/config" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" "golang.org/x/sync/semaphore" ) diff --git a/pkg/odp/event/event_manager_test.go b/pkg/odp/event/event_manager_test.go index 194f89478..47b892d0a 100644 --- a/pkg/odp/event/event_manager_test.go +++ b/pkg/odp/event/event_manager_test.go @@ -25,11 +25,11 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/event" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/config" - "github.com/optimizely/go-sdk/pkg/odp/utils" - pkgUtils "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/event" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/config" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/utils" "github.com/stretchr/testify/suite" ) diff --git a/pkg/odp/odp_manager.go b/pkg/odp/odp_manager.go index b7e014276..88c063912 100644 --- a/pkg/odp/odp_manager.go +++ b/pkg/odp/odp_manager.go @@ -21,12 +21,12 @@ import ( "errors" "time" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/cache" - "github.com/optimizely/go-sdk/pkg/odp/config" - "github.com/optimizely/go-sdk/pkg/odp/event" - "github.com/optimizely/go-sdk/pkg/odp/segment" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/cache" + "github.com/optimizely/go-sdk/v2/pkg/odp/config" + "github.com/optimizely/go-sdk/v2/pkg/odp/event" + "github.com/optimizely/go-sdk/v2/pkg/odp/segment" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" ) // OMOptionFunc are the ODPManager options that give you the ability to add one more more options before the odp manager is initialized. diff --git a/pkg/odp/odp_manager_test.go b/pkg/odp/odp_manager_test.go index a7d4475b1..8c78ec539 100644 --- a/pkg/odp/odp_manager_test.go +++ b/pkg/odp/odp_manager_test.go @@ -23,11 +23,11 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/odp/cache" - "github.com/optimizely/go-sdk/pkg/odp/config" - "github.com/optimizely/go-sdk/pkg/odp/event" - "github.com/optimizely/go-sdk/pkg/odp/segment" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/odp/cache" + "github.com/optimizely/go-sdk/v2/pkg/odp/config" + "github.com/optimizely/go-sdk/v2/pkg/odp/event" + "github.com/optimizely/go-sdk/v2/pkg/odp/segment" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" "github.com/stretchr/testify/mock" "github.com/stretchr/testify/suite" ) diff --git a/pkg/odp/segment/segment_api_manager.go b/pkg/odp/segment/segment_api_manager.go index 573d874bb..ea92ab8e0 100644 --- a/pkg/odp/segment/segment_api_manager.go +++ b/pkg/odp/segment/segment_api_manager.go @@ -24,9 +24,9 @@ import ( "net/url" "strings" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/utils" - pkgUtils "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/utils" ) const graphqlAPIEndpointPath = "/v3/graphql" diff --git a/pkg/odp/segment/segment_api_manager_test.go b/pkg/odp/segment/segment_api_manager_test.go index 3d2458eca..00b847a15 100644 --- a/pkg/odp/segment/segment_api_manager_test.go +++ b/pkg/odp/segment/segment_api_manager_test.go @@ -26,9 +26,9 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/logging" - "github.com/optimizely/go-sdk/pkg/odp/utils" - pkgUtils "github.com/optimizely/go-sdk/pkg/utils" + "github.com/optimizely/go-sdk/v2/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" + pkgUtils "github.com/optimizely/go-sdk/v2/pkg/utils" "github.com/stretchr/testify/suite" ) diff --git a/pkg/odp/segment/segment_manager.go b/pkg/odp/segment/segment_manager.go index 685345947..1b866a45c 100644 --- a/pkg/odp/segment/segment_manager.go +++ b/pkg/odp/segment/segment_manager.go @@ -21,8 +21,8 @@ import ( "fmt" "time" - "github.com/optimizely/go-sdk/pkg/odp/cache" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/odp/cache" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" ) // SMOptionFunc are the SegmentManager options that give you the ability to add one more more options before the segment manager is initialized. diff --git a/pkg/odp/segment/segment_manager_test.go b/pkg/odp/segment/segment_manager_test.go index 13ee58a38..1dbe79477 100644 --- a/pkg/odp/segment/segment_manager_test.go +++ b/pkg/odp/segment/segment_manager_test.go @@ -22,7 +22,7 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/odp/utils" + "github.com/optimizely/go-sdk/v2/pkg/odp/utils" "github.com/stretchr/testify/suite" ) diff --git a/pkg/odp/utils/utils.go b/pkg/odp/utils/utils.go index 7f956a122..2f7da2025 100644 --- a/pkg/odp/utils/utils.go +++ b/pkg/odp/utils/utils.go @@ -17,7 +17,7 @@ // Package utils // package utils -import "github.com/optimizely/go-sdk/pkg/utils" +import "github.com/optimizely/go-sdk/v2/pkg/utils" // CompareSlices determines if two string slices are equal func CompareSlices(a, b []string) bool { diff --git a/pkg/registry/service.go b/pkg/registry/service.go index 88f64db1d..e68102101 100644 --- a/pkg/registry/service.go +++ b/pkg/registry/service.go @@ -20,7 +20,7 @@ package registry import ( "sync" - "github.com/optimizely/go-sdk/pkg/notification" + "github.com/optimizely/go-sdk/v2/pkg/notification" ) var notificationCenterCache = make(map[string]notification.Center) diff --git a/pkg/utils/execgroup.go b/pkg/utils/execgroup.go index 509608c7c..df72a7cd5 100644 --- a/pkg/utils/execgroup.go +++ b/pkg/utils/execgroup.go @@ -19,8 +19,9 @@ package utils import ( "context" - "github.com/optimizely/go-sdk/pkg/logging" "sync" + + "github.com/optimizely/go-sdk/v2/pkg/logging" ) // ExecGroup is a utility for managing graceful, blocking cancellation of goroutines. diff --git a/pkg/utils/execgroup_test.go b/pkg/utils/execgroup_test.go index 6357a442a..e79f06138 100644 --- a/pkg/utils/execgroup_test.go +++ b/pkg/utils/execgroup_test.go @@ -19,9 +19,10 @@ package utils import ( "context" - "github.com/optimizely/go-sdk/pkg/logging" "sync" "testing" + + "github.com/optimizely/go-sdk/v2/pkg/logging" ) func TestWithContextCancelFunc(t *testing.T) { diff --git a/pkg/utils/requester.go b/pkg/utils/requester.go index b734f562f..a8f8f4de5 100644 --- a/pkg/utils/requester.go +++ b/pkg/utils/requester.go @@ -25,7 +25,7 @@ import ( "net/http" "time" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" jsoniter "github.com/json-iterator/go" ) diff --git a/pkg/utils/requester_test.go b/pkg/utils/requester_test.go index 71e7a70a1..10e6fb654 100644 --- a/pkg/utils/requester_test.go +++ b/pkg/utils/requester_test.go @@ -26,7 +26,7 @@ import ( "testing" "time" - "github.com/optimizely/go-sdk/pkg/logging" + "github.com/optimizely/go-sdk/v2/pkg/logging" "github.com/stretchr/testify/assert" )