Skip to content

Commit

Permalink
Bump Go to 1.23 (#365)
Browse files Browse the repository at this point in the history
Go 1.21 is no longer maintained.
We also upgrade all module dependencies to the latest minor.patch
version available.

Signed-off-by: Antonin Bas <[email protected]>
  • Loading branch information
antoninbas authored Sep 12, 2024
1 parent 63a547f commit a5e552a
Show file tree
Hide file tree
Showing 15 changed files with 205 additions and 134 deletions.
13 changes: 11 additions & 2 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,22 @@
run:
tests: true
timeout: 10m
skip-dirs-use-default: true
build-tags:
- integration

linters-settings:
goimports:
local-prefixes: github.com/vmware/go-ipfix
gosec:
excludes:
# At the time of writing this, the G115 rule is not even part of an
# official release of gosec. This rule causes a lot of errors to be
# reported in the codebase. While some of the reported errors should be
# addressed, a lot can also be ignored and there are also some clear false
# positives that should not be flagged by gosec in the first place (see
# https://github.com/securego/gosec/issues/1187). We will re-enable this
# rule in the future when it becomes more accurate.
- G115 # Potential integer overflow when converting between integer types

linters:
disable-all: true
Expand All @@ -19,4 +28,4 @@ linters:
- staticcheck
- gosec
- goimports
- vet
- govet
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ GOPATH ?= $$($(GO) env GOPATH)
BINDIR ?= $(CURDIR)/bin
GOMOCK_VERSION := v0.3.0
PROTOC_GEN_GO_VERSION := v1.28.1
GOLANGCI_LINT_VERSION := v1.54.2
GOLANGCI_LINT_VERSION := v1.60.3
GOLANGCI_LINT_BINDIR := .golangci-bin
GOLANGCI_LINT_BIN := $(GOLANGCI_LINT_BINDIR)/$(GOLANGCI_LINT_VERSION)/golangci-lint
GO_FILES := $(shell find . -type d -name '.cache' -prune -o -type f -name '*.go' -print)
Expand Down
5 changes: 3 additions & 2 deletions cmd/consumer/consumer.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@
package main

import (
"context"
"flag"
"os"
"os/signal"
"strings"
"syscall"
"time"

"github.com/Shopify/sarama"
"github.com/IBM/sarama"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"k8s.io/apimachinery/pkg/util/wait"
Expand Down Expand Up @@ -88,7 +89,7 @@ func run() error {
}
consumer := consumer.NewKafkaConsumer(input)
go func() {
err := wait.PollImmediateInfinite(500*time.Millisecond, func() (bool, error) {
err := wait.PollUntilContextCancel(context.TODO(), 500*time.Millisecond, true, func(ctx context.Context) (bool, error) {
if err := consumer.InitSaramaConsumer(); err != nil {
return false, nil
} else {
Expand Down
66 changes: 39 additions & 27 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,58 +1,70 @@
module github.com/vmware/go-ipfix

go 1.21
go 1.23.0

require (
github.com/Shopify/sarama v1.37.2
github.com/pion/dtls/v2 v2.2.4
github.com/spf13/cobra v1.6.1
github.com/IBM/sarama v1.43.3
github.com/pion/dtls/v2 v2.2.12
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.5
github.com/stretchr/testify v1.9.0
go.uber.org/mock v0.3.0
google.golang.org/protobuf v1.33.0
k8s.io/apimachinery v0.24.9
k8s.io/component-base v0.24.9
k8s.io/klog/v2 v2.80.1
go.uber.org/mock v0.4.0
google.golang.org/protobuf v1.34.2
k8s.io/apimachinery v0.31.0
k8s.io/component-base v0.31.0
k8s.io/klog/v2 v2.130.1
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blang/semver/v4 v4.0.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/eapache/go-resiliency v1.7.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230731223053-c322873962e3 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/go-logr/logr v1.2.0 // indirect
github.com/fxamacker/cbor/v2 v2.7.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/google/gofuzz v1.1.0 // indirect
github.com/google/go-cmp v0.6.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.4 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.15.13 // indirect
github.com/klauspost/compress v1.17.9 // indirect
github.com/kr/text v0.2.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/pierrec/lz4/v4 v4.1.21 // indirect
github.com/pion/logging v0.2.2 // indirect
github.com/pion/transport/v2 v2.0.0 // indirect
github.com/pion/udp v0.1.4 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/pion/transport/v2 v2.2.10 // indirect
github.com/pion/transport/v3 v3.0.7 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/client_golang v1.20.3 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.59.1 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
github.com/rogpeppe/go-internal v1.9.0 // indirect
golang.org/x/crypto v0.21.0 // indirect
golang.org/x/net v0.23.0 // indirect
golang.org/x/text v0.14.0 // indirect
github.com/x448/float16 v0.8.4 // indirect
golang.org/x/crypto v0.27.0 // indirect
golang.org/x/net v0.29.0 // indirect
golang.org/x/sys v0.25.0 // indirect
golang.org/x/text v0.18.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
k8s.io/utils v0.0.0-20220210201930-3a6ce19ff2f9 // indirect
sigs.k8s.io/json v0.0.0-20211208200746-9f7c6b3444d2 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.2.1 // indirect
k8s.io/utils v0.0.0-20240902221715-702e33fdd3c3 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
)

retract v0.10.0
Loading

0 comments on commit a5e552a

Please sign in to comment.