Skip to content

chore: remove golang.org/x/exp as depenency #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 8, 2025
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
6 changes: 3 additions & 3 deletions .github/variables/go-versions.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
latest=1.23
penultimate=1.22
min=1.18
latest=1.24
penultimate=1.23
min=1.23
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

GOLANGCI_LINT_VERSION=v1.60.1
GOLANGCI_LINT_VERSION=v1.64.5

LINTER=./bin/golangci-lint
LINTER_VERSION_FILE=./bin/.golangci-lint-version-$(GOLANGCI_LINT_VERSION)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Applications using the LaunchDarkly Go SDK will generally use the `ldcontext` su

## Supported Go versions

This version of the project requires a Go version of 1.18 or higher.
This version of the project requires a Go version of 1.23 or higher.

## Integration with easyjson

Expand Down
3 changes: 1 addition & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
module github.com/launchdarkly/go-sdk-common/v3

go 1.18
go 1.23

require (
github.com/launchdarkly/go-jsonstream/v3 v3.0.0
github.com/launchdarkly/go-test-helpers/v3 v3.0.1
github.com/mailru/easyjson v0.7.6
github.com/stretchr/testify v1.7.0
golang.org/x/exp v0.0.0-20220823124025-807a23277127
)

require (
Expand Down
2 changes: 0 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZN
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
golang.org/x/exp v0.0.0-20220823124025-807a23277127 h1:S4NrSKDfihhl3+4jSTgwoIevKxX9p7Iv9x++OEIptDo=
golang.org/x/exp v0.0.0-20220823124025-807a23277127/go.mod h1:cyybsKvd6eL0RnXn6p/Grxp8F5bW7iYuBgsNCOHpMYE=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
Expand Down
2 changes: 1 addition & 1 deletion ldcontext/builder_multi.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

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

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

const defaultMultiBuilderCapacity = 3 // arbitrary value based on presumed likely use cases
Expand Down
2 changes: 1 addition & 1 deletion ldcontext/builder_simple.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/lderrors"
"github.com/launchdarkly/go-sdk-common/v3/ldvalue"

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

// Builder is a mutable object that uses the builder pattern to specify properties for a Context.
Expand Down
2 changes: 1 addition & 1 deletion ldcontext/context.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/lderrors"
"github.com/launchdarkly/go-sdk-common/v3/ldvalue"

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

// Context is a collection of attributes that can be referenced in flag evaluations and analytics events.
Expand Down
8 changes: 4 additions & 4 deletions lderrors/context_errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package lderrors

import (
"fmt"
"sort"
"slices"
"strings"

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

const (
Expand Down Expand Up @@ -83,8 +83,8 @@ func (e ErrContextKindMultiDuplicates) Error() string { return msgContextKind
func (e ErrContextKindInvalidChars) Error() string { return msgContextKindInvalidChars }

func (e ErrContextPerKindErrors) Error() string {
sortedKeys := maps.Keys(e.Errors)
sort.Strings(sortedKeys)
sortedKeys := slices.Sorted(maps.Keys(e.Errors))

messages := make([]string, 0, len(e.Errors))
for _, kind := range sortedKeys {
messages = append(messages, fmt.Sprintf("(%s) %s", kind, e.Errors[kind]))
Expand Down
2 changes: 1 addition & 1 deletion ldtime/unix_millis.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type UnixMillisecondTime uint64
// UnixMillisFromTime converts a Time value into UnixMillisecondTime.
func UnixMillisFromTime(t time.Time) UnixMillisecondTime {
ms := time.Duration(t.UnixNano()) / time.Millisecond
return UnixMillisecondTime(ms)
return UnixMillisecondTime(ms) //nolint:gosec
}

// UnixMillisNow returns the current date/time as a UnixMillisecondTime.
Expand Down
2 changes: 1 addition & 1 deletion ldvalue/value_array.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ldvalue

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

// we reuse this for all non-nil zero-length ValueArray instances
Expand Down
2 changes: 1 addition & 1 deletion ldvalue/value_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package ldvalue
import (
"encoding/json"

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

// Value represents any of the data types supported by JSON, all of which can be used for a LaunchDarkly
Expand Down
2 changes: 1 addition & 1 deletion ldvalue/value_map.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package ldvalue

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

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