Skip to content

Commit 3a5523a

Browse files
authored
chore: Remove golang.org/x/exp as dependency (#36)
1 parent 47bb7a2 commit 3a5523a

File tree

13 files changed

+17
-21
lines changed

13 files changed

+17
-21
lines changed

.github/variables/go-versions.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
latest=1.23
2-
penultimate=1.22
3-
min=1.18
1+
latest=1.24
2+
penultimate=1.23
3+
min=1.23

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
2-
GOLANGCI_LINT_VERSION=v1.60.1
1+
GOLANGCI_LINT_VERSION=v1.64.5
32

43
LINTER=./bin/golangci-lint
54
LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION)

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Applications using the LaunchDarkly Go SDK will generally use the `ldcontext` su
1212

1313
## Supported Go versions
1414

15-
This version of the project requires a Go version of 1.18 or higher.
15+
This version of the project requires a Go version of 1.23 or higher.
1616

1717
## Integration with easyjson
1818

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
module github.com/launchdarkly/go-sdk-common/v3
22

3-
go 1.18
3+
go 1.23
44

55
require (
66
github.com/launchdarkly/go-jsonstream/v3 v3.0.0
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]))

ldtime/unix_millis.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type UnixMillisecondTime uint64
88
// UnixMillisFromTime converts a Time value into UnixMillisecondTime.
99
func UnixMillisFromTime(t time.Time) UnixMillisecondTime {
1010
ms := time.Duration(t.UnixNano()) / time.Millisecond
11-
return UnixMillisecondTime(ms)
11+
return UnixMillisecondTime(ms) //nolint:gosec
1212
}
1313

1414
// UnixMillisNow returns the current date/time as a UnixMillisecondTime.

0 commit comments

Comments
 (0)