Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ require (
github.com/launchdarkly/go-test-helpers/v3 v3.0.2
github.com/patrickmn/go-cache v2.1.0+incompatible
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
golang.org/x/sync v0.8.0
gopkg.in/ghodss/yaml.v1 v1.0.0
)
Expand All @@ -30,6 +29,7 @@ require (
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
golang.org/x/crypto v0.36.0 // indirect
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
golang.org/x/sys v0.31.0 // indirect
gopkg.in/yaml.v2 v2.3.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
Expand Down
2 changes: 1 addition & 1 deletion interfaces/flagstate/flags_state.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"github.com/launchdarkly/go-sdk-common/v3/ldtime"
"github.com/launchdarkly/go-sdk-common/v3/ldvalue"

"golang.org/x/exp/maps"
"maps"
)

// AllFlags is a snapshot of the state of multiple feature flags with regard to a specific evaluation
Expand Down
2 changes: 1 addition & 1 deletion internal/broadcasters.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package internal
import (
"sync"

"golang.org/x/exp/slices"
"slices"
)

// This file defines the publish-subscribe model we use for various status/event types in the SDK.
Expand Down
3 changes: 2 additions & 1 deletion internal/datasource/polling_http_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ import (

"github.com/launchdarkly/go-jsonstream/v3/jreader"

"maps"

"github.com/gregjones/httpcache"
"golang.org/x/exp/maps"
)

// PollingRequester is the internal implementation of getting flag/segment data from the LD polling endpoints.
Expand Down
2 changes: 1 addition & 1 deletion internal/datasource/streaming_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import (

es "github.com/launchdarkly/eventsource"

"golang.org/x/exp/maps"
"maps"
)

// Implementation of the streaming data source, not including the lower-level SSE implementation which is in
Expand Down
3 changes: 2 additions & 1 deletion internal/datasourcev2/polling_http_request.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@ import (
"net/http"
"net/url"

"maps"

"github.com/gregjones/httpcache"
"golang.org/x/exp/maps"

"github.com/launchdarkly/go-sdk-common/v3/ldlog"
"github.com/launchdarkly/go-server-sdk/v7/internal/endpoints"
Expand Down
2 changes: 1 addition & 1 deletion internal/datasourcev2/streaming_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import (
"github.com/launchdarkly/go-server-sdk/v7/internal/endpoints"
"github.com/launchdarkly/go-server-sdk/v7/subsystems"

"golang.org/x/exp/maps"
"maps"
)

const (
Expand Down
3 changes: 2 additions & 1 deletion internal/datastore/persistent_data_store_wrapper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ import (
"github.com/launchdarkly/go-server-sdk/v7/subsystems"
st "github.com/launchdarkly/go-server-sdk/v7/subsystems/ldstoretypes"

"slices"

"github.com/patrickmn/go-cache"
"golang.org/x/exp/slices"
"golang.org/x/sync/singleflight"
)

Expand Down
2 changes: 1 addition & 1 deletion internal/sharedtest/hooks.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"reflect"
"testing"

"golang.org/x/exp/slices"
"slices"

"github.com/stretchr/testify/assert"

Expand Down
10 changes: 6 additions & 4 deletions internal/sharedtest/mocks/mock_persistent_data_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ import (
"time"

"github.com/launchdarkly/go-server-sdk/v7/subsystems/ldstoretypes"

"golang.org/x/exp/maps"
)

// MockDatabaseInstance can be used with MockPersistentDataStore to simulate multiple data store
Expand All @@ -27,7 +25,9 @@ func NewMockDatabaseInstance() *MockDatabaseInstance {
// Clear removes all shared data.
func (db *MockDatabaseInstance) Clear(prefix string) {
for _, m := range db.dataByPrefix[prefix] {
maps.Clear(m)
for k := range m {
delete(m, k)
}
}
if v, ok := db.initedByPrefix[prefix]; ok {
*v = false
Expand Down Expand Up @@ -177,7 +177,9 @@ func (m *MockPersistentDataStore) Init(allData []ldstoretypes.SerializedCollecti
return m.fakeError
}
for _, mm := range m.data {
maps.Clear(mm)
for k := range mm {
delete(mm, k)
}
}
for _, coll := range allData {
AssertNotNil(coll.Kind)
Expand Down
5 changes: 3 additions & 2 deletions ldai/config.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package ldai

import (
"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"maps"

"slices"

"github.com/launchdarkly/go-sdk-common/v3/ldvalue"
"github.com/launchdarkly/go-server-sdk/ldai/datamodel"
Expand Down
2 changes: 1 addition & 1 deletion ldai/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ require (
github.com/launchdarkly/go-sdk-common/v3 v3.3.0
github.com/launchdarkly/go-server-sdk/v7 v7.7.0
github.com/stretchr/testify v1.9.0
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
)

require (
Expand All @@ -18,5 +17,6 @@ require (
github.com/launchdarkly/go-sdk-events/v3 v3.4.0 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 1 addition & 1 deletion testhelpers/ldtestdata/test_data_source.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/launchdarkly/go-server-sdk/v7/subsystems/ldstoreimpl"
"github.com/launchdarkly/go-server-sdk/v7/subsystems/ldstoretypes"

"golang.org/x/exp/slices"
"slices"
)

// TestDataSource is a test fixture that provides dynamically updatable feature flag state in a
Expand Down
5 changes: 3 additions & 2 deletions testhelpers/ldtestdata/test_data_source_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"github.com/launchdarkly/go-server-sdk-evaluation/v3/ldbuilders"
"github.com/launchdarkly/go-server-sdk-evaluation/v3/ldmodel"

"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"maps"

"slices"
)

const (
Expand Down
5 changes: 3 additions & 2 deletions testhelpers/ldtestdatav2/test_data_source_flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"github.com/launchdarkly/go-server-sdk-evaluation/v3/ldbuilders"
"github.com/launchdarkly/go-server-sdk-evaluation/v3/ldmodel"

"golang.org/x/exp/maps"
"golang.org/x/exp/slices"
"maps"

"slices"
)

const (
Expand Down