From e74b280779f9324951d3265097250b9d4fafbb52 Mon Sep 17 00:00:00 2001 From: LaunchDarklyReleaseBot Date: Tue, 18 Feb 2025 17:05:29 +0000 Subject: [PATCH 1/2] Bumps from Go 1.23 -> 1.24 and 1.22 -> 1.23. --- .github/variables/go-versions.env | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/variables/go-versions.env b/.github/variables/go-versions.env index b028966c..3aa5ca84 100644 --- a/.github/variables/go-versions.env +++ b/.github/variables/go-versions.env @@ -1,3 +1,3 @@ -latest=1.23 -penultimate=1.22 +latest=1.24 +penultimate=1.23 min=1.20 From c9a001e474fea52240382f1b61e6318f508db96a Mon Sep 17 00:00:00 2001 From: Matthew Keeler Date: Tue, 18 Feb 2025 12:46:15 -0500 Subject: [PATCH 2/2] chore: Bump linter version and fix warnings --- .golangci.yml | 1 - Makefile | 2 +- internal/concurrent.go | 4 +--- internal/endpoints/configure_endpoints.go | 2 +- ldcomponents/send_events.go | 2 +- server_side_diagnostics.go | 2 +- subsystems/ldstoreimpl/big_segment_store_wrapper.go | 2 +- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 0c5782ea..f14ead3b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -7,7 +7,6 @@ linters: - bodyclose - dupl - errcheck - - exportloopref - goconst - gochecknoglobals - gochecknoinits diff --git a/Makefile b/Makefile index 73e0c88c..e75f81ac 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +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) diff --git a/internal/concurrent.go b/internal/concurrent.go index bc7b9085..9c30b7c0 100644 --- a/internal/concurrent.go +++ b/internal/concurrent.go @@ -1,8 +1,6 @@ package internal -import ( - "sync/atomic" -) +import "sync/atomic" // AtomicBoolean is a simple atomic boolean type based on sync/atomic. Since sync/atomic supports // only integer types, the implementation uses an int32. (Note: we should be able to get rid of diff --git a/internal/endpoints/configure_endpoints.go b/internal/endpoints/configure_endpoints.go index 63f18a28..853c7651 100644 --- a/internal/endpoints/configure_endpoints.go +++ b/internal/endpoints/configure_endpoints.go @@ -13,7 +13,7 @@ type ServiceType int const ( StreamingService ServiceType = iota //nolint:revive // internal constant PollingService ServiceType = iota //nolint:revive // internal constant - EventsService ServiceType = iota //nolint:revive // internal constant + EventsService ServiceType = iota // internal constant ) func (s ServiceType) String() string { diff --git a/ldcomponents/send_events.go b/ldcomponents/send_events.go index cdedbf3c..a17b0928 100644 --- a/ldcomponents/send_events.go +++ b/ldcomponents/send_events.go @@ -236,5 +236,5 @@ func (b *EventProcessorBuilder) DescribeConfiguration(context subsystems.ClientC } func durationToMillisValue(d time.Duration) ldvalue.Value { - return ldvalue.Float64(float64(uint64(d / time.Millisecond))) + return ldvalue.Float64(float64(uint64(d / time.Millisecond))) //nolint:gosec } diff --git a/server_side_diagnostics.go b/server_side_diagnostics.go index fbc82592..852d1151 100644 --- a/server_side_diagnostics.go +++ b/server_side_diagnostics.go @@ -105,5 +105,5 @@ func makeDiagnosticSDKData() ldvalue.Value { } func durationToMillis(d time.Duration) ldvalue.Value { - return ldvalue.Float64(float64(uint64(d / time.Millisecond))) + return ldvalue.Float64(float64(uint64(d / time.Millisecond))) //nolint:gosec } diff --git a/subsystems/ldstoreimpl/big_segment_store_wrapper.go b/subsystems/ldstoreimpl/big_segment_store_wrapper.go index 0ba9f567..b4e02fb0 100644 --- a/subsystems/ldstoreimpl/big_segment_store_wrapper.go +++ b/subsystems/ldstoreimpl/big_segment_store_wrapper.go @@ -245,7 +245,7 @@ func (w *BigSegmentStoreWrapper) pollStoreAndUpdateStatus() interfaces.BigSegmen } func (w *BigSegmentStoreWrapper) isStale(updateTime ldtime.UnixMillisecondTime) bool { - age := time.Duration(uint64(ldtime.UnixMillisNow())-uint64(updateTime)) * time.Millisecond + age := time.Duration(uint64(ldtime.UnixMillisNow())-uint64(updateTime)) * time.Millisecond //nolint:gosec return age >= w.staleTime }