Skip to content

Commit d4c58c1

Browse files
committed
removed golang.org/x/exp
removed golang.org/x/exp as depenency, and use standard library
1 parent 47bb7a2 commit d4c58c1

File tree

9 files changed

+10
-13
lines changed

9 files changed

+10
-13
lines changed

go.mod

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ require (
77
github.com/launchdarkly/go-test-helpers/v3 v3.0.1
88
github.com/mailru/easyjson v0.7.6
99
github.com/stretchr/testify v1.7.0
10-
golang.org/x/exp v0.0.0-20220823124025-807a23277127
1110
)
1211

1312
require (

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
2121
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
2222
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
2323
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
24-
golang.org/x/exp v0.0.0-20220823124025-807a23277127 h1:S4NrSKDfihhl3+4jSTgwoIevKxX9p7Iv9x++OEIptDo=
25-
golang.org/x/exp v0.0.0-20220823124025-807a23277127/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
2624
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2725
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
2826
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=

ldcontext/builder_multi.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import (
55

66
"github.com/launchdarkly/go-sdk-common/v3/lderrors"
77

8-
"golang.org/x/exp/slices"
8+
"slices"
99
)
1010

1111
const defaultMultiBuilderCapacity = 3 // arbitrary value based on presumed likely use cases

ldcontext/builder_simple.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/launchdarkly/go-sdk-common/v3/lderrors"
99
"github.com/launchdarkly/go-sdk-common/v3/ldvalue"
1010

11-
"golang.org/x/exp/slices"
11+
"slices"
1212
)
1313

1414
// Builder is a mutable object that uses the builder pattern to specify properties for a Context.

ldcontext/context.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/launchdarkly/go-sdk-common/v3/lderrors"
99
"github.com/launchdarkly/go-sdk-common/v3/ldvalue"
1010

11-
"golang.org/x/exp/slices"
11+
"slices"
1212
)
1313

1414
// Context is a collection of attributes that can be referenced in flag evaluations and analytics events.

lderrors/context_errors.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ package lderrors
22

33
import (
44
"fmt"
5-
"sort"
5+
"slices"
66
"strings"
77

8-
"golang.org/x/exp/maps"
8+
"maps"
99
)
1010

1111
const (
@@ -83,8 +83,8 @@ func (e ErrContextKindMultiDuplicates) Error() string { return msgContextKind
8383
func (e ErrContextKindInvalidChars) Error() string { return msgContextKindInvalidChars }
8484

8585
func (e ErrContextPerKindErrors) Error() string {
86-
sortedKeys := maps.Keys(e.Errors)
87-
sort.Strings(sortedKeys)
86+
sortedKeys := slices.Sorted(maps.Keys(e.Errors))
87+
8888
messages := make([]string, 0, len(e.Errors))
8989
for _, kind := range sortedKeys {
9090
messages = append(messages, fmt.Sprintf("(%s) %s", kind, e.Errors[kind]))

ldvalue/value_array.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ldvalue
22

33
import (
4-
"golang.org/x/exp/slices"
4+
"slices"
55
)
66

77
// we reuse this for all non-nil zero-length ValueArray instances

ldvalue/value_base.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package ldvalue
33
import (
44
"encoding/json"
55

6-
"golang.org/x/exp/slices"
6+
"slices"
77
)
88

99
// Value represents any of the data types supported by JSON, all of which can be used for a LaunchDarkly

ldvalue/value_map.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package ldvalue
22

33
import (
4-
"golang.org/x/exp/maps"
4+
"maps"
55
)
66

77
// we reuse this for all non-nil zero-length ValueMap instances

0 commit comments

Comments
 (0)