Skip to content

Commit

Permalink
chore: update Go to 1.22.4, other updates
Browse files Browse the repository at this point in the history
Bump go modules, adjust the code.

New linter warnings.

Signed-off-by: Andrey Smirnov <[email protected]>
  • Loading branch information
smira committed Jun 5, 2024
1 parent 4621e9b commit 6cd2bed
Show file tree
Hide file tree
Showing 36 changed files with 246 additions and 244 deletions.
17 changes: 5 additions & 12 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,11 @@ linters-settings:
# report about assignment of errors to blank identifier: `num, _ := strconv.Atoi(numStr)`;
# default is false: such cases aren't reported by default.
check-blank: true

exclude-functions:
- fmt.Fprintln
- fmt.Fprintf
- fmt.Fprint
govet: { }
gocyclo:
# minimal code complexity to report, 30 by default (but we recommend 10-20)
Expand Down Expand Up @@ -108,7 +113,6 @@ linters:
- errorlint
- err113
- exhaustruct
- exhaustivestruct
- forbidigo
- forcetypeassert
- funlen
Expand All @@ -124,7 +128,6 @@ linters:
- nestif
- nilnil # we return "nil, nil"
- nonamedreturns
- nosnakecase
- paralleltest
- promlinter # https://github.com/golangci/golangci-lint/issues/2222
- tagliatelle # we have many different conventions
Expand All @@ -140,16 +143,6 @@ linters:
- testifylint # too annoying
- inamedparam # too annoying
- protogetter # too annoying

# abandoned linters for which golangci shows the warning that the repo is archived by the owner
- golint
- interfacer
- maligned
- scopelint
- varcheck
- structcheck
- deadcode
- ifshort
- perfsprint
disable-all: false
fast: false
Expand Down
20 changes: 10 additions & 10 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ CLOUD_IMAGES_EXTRA_ARGS ?= ""
ZSTD_COMPRESSION_LEVEL ?= 18

ARTIFACTS := _out
TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-alpha.0-4-g06ba64e
TOOLS ?= ghcr.io/siderolabs/tools:v1.8.0-alpha.0-5-gd2746e5

PKGS_PREFIX ?= ghcr.io/siderolabs
PKGS ?= v1.8.0-alpha.0-19-gf350879
EXTRAS ?= v1.8.0-alpha.0-1-g01ad9f5
PKGS ?= v1.8.0-alpha.0-23-gc309452
EXTRAS ?= v1.8.0-alpha.0-2-g0efb05f

KRES_IMAGE ?= ghcr.io/siderolabs/kres:latest
CONFORMANCE_IMAGE ?= ghcr.io/siderolabs/conform:latest
Expand Down Expand Up @@ -54,17 +54,17 @@ PKG_TALOSCTL_CNI_BUNDLE_INSTALL ?= $(PKGS_PREFIX)/talosctl-cni-bundle-install:$(
# renovate: datasource=github-tags depName=golang/go
GO_VERSION ?= 1.22
# renovate: datasource=go depName=golang.org/x/tools
GOIMPORTS_VERSION ?= v0.20.0
GOIMPORTS_VERSION ?= v0.21.0
# renovate: datasource=go depName=mvdan.cc/gofumpt
GOFUMPT_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCILINT_VERSION ?= v1.58.0
GOLANGCILINT_VERSION ?= v1.59.0
# renovate: datasource=go depName=golang.org/x/tools
STRINGER_VERSION ?= v0.19.0
STRINGER_VERSION ?= v0.21.0
# renovate: datasource=go depName=github.com/dmarkham/enumer
ENUMER_VERSION ?= v1.5.9
# renovate: datasource=go depName=k8s.io/code-generator
DEEPCOPY_GEN_VERSION ?= v0.30.0
DEEPCOPY_GEN_VERSION ?= v0.30.1
# renovate: datasource=go depName=github.com/planetscale/vtprotobuf
VTPROTOBUF_VERSION ?= v0.6.0
# renovate: datasource=go depName=github.com/siderolabs/deep-copy
Expand Down Expand Up @@ -92,11 +92,11 @@ KUBECTL_VERSION ?= v1.30.1
# renovate: datasource=github-releases depName=kastenhq/kubestr
KUBESTR_VERSION ?= v0.4.44
# renovate: datasource=github-releases depName=helm/helm
HELM_VERSION ?= v3.14.4
HELM_VERSION ?= v3.15.1
# renovate: datasource=github-releases depName=kubernetes-sigs/cluster-api
CLUSTERCTL_VERSION ?= 1.7.1
CLUSTERCTL_VERSION ?= 1.7.2
# renovate: datasource=github-releases depName=cilium/cilium-cli
CILIUM_CLI_VERSION ?= v0.16.7
CILIUM_CLI_VERSION ?= v0.16.9
KUBECTL_URL ?= https://dl.k8s.io/release/$(KUBECTL_VERSION)/bin/$(OPERATING_SYSTEM)/amd64/kubectl
KUBESTR_URL ?= https://github.com/kastenhq/kubestr/releases/download/$(KUBESTR_VERSION)/kubestr_$(subst v,,$(KUBESTR_VERSION))_Linux_amd64.tar.gz
HELM_URL ?= https://get.helm.sh/helm-$(HELM_VERSION)-linux-amd64.tar.gz
Expand Down
2 changes: 1 addition & 1 deletion cmd/talosctl/pkg/talos/helpers/confirm.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func Confirm(prompt string) bool {
var inp string

fmt.Printf("%s (y/N): ", prompt)
fmt.Scanf("%s", &inp)
fmt.Scanf("%s", &inp) //nolint:errcheck
inp = strings.TrimSpace(inp)

for _, ok := range okays {
Expand Down
90 changes: 45 additions & 45 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/siderolabs/talos

go 1.22.3
go 1.22.4

replace (
// forked coredns so we don't carry caddy and other stuff into the Talos
Expand Down Expand Up @@ -44,32 +44,32 @@ require (
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azcertificates v1.1.0
github.com/Azure/azure-sdk-for-go/sdk/security/keyvault/azkeys v1.1.0
github.com/alexflint/go-filemutex v1.3.0
github.com/aws/aws-sdk-go-v2/config v1.27.11
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.1
github.com/aws/aws-sdk-go-v2/service/kms v1.31.0
github.com/aws/aws-sdk-go-v2/config v1.27.17
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.4
github.com/aws/aws-sdk-go-v2/service/kms v1.32.2
github.com/aws/smithy-go v1.20.2
github.com/beevik/ntp v1.4.3
github.com/benbjohnson/clock v1.3.5 // project archived on 2023-05-18
github.com/blang/semver/v4 v4.0.0
github.com/cenkalti/backoff/v4 v4.3.0
github.com/containerd/cgroups/v3 v3.0.3
github.com/containerd/containerd/api v1.8.0-rc.0
github.com/containerd/containerd/api v1.8.0-rc.2
github.com/containerd/containerd/v2 v2.0.0-rc.2
github.com/containerd/errdefs v0.1.0
github.com/containerd/platforms v0.2.0
github.com/containerd/typeurl/v2 v2.1.1
github.com/containernetworking/cni v1.2.0
github.com/containernetworking/plugins v1.4.1
github.com/containernetworking/plugins v1.5.0
github.com/coredns/coredns v1.11.2
github.com/coreos/go-iptables v0.7.0
github.com/cosi-project/runtime v0.4.2
github.com/cosi-project/runtime v0.4.3
github.com/distribution/reference v0.6.0
github.com/docker/docker v26.1.1+incompatible
github.com/docker/docker v26.1.3+incompatible
github.com/docker/go-connections v0.5.0
github.com/dustin/go-humanize v1.0.1
github.com/ecks/uefi v0.0.0-20221116212947-caef65d070eb
github.com/fatih/color v1.16.0
github.com/foxboron/go-uefi v0.0.0-20240128152106-48be911532c2
github.com/fatih/color v1.17.0
github.com/foxboron/go-uefi v0.0.0-20240522180132-205d5597883a
github.com/freddierice/go-losetup/v2 v2.0.1
github.com/fsnotify/fsnotify v1.7.0
github.com/gdamore/tcell/v2 v2.7.4
Expand All @@ -87,10 +87,10 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware/v2 v2.1.0
github.com/hashicorp/go-cleanhttp v0.5.2
github.com/hashicorp/go-envparse v0.1.0
github.com/hashicorp/go-getter/v2 v2.2.1
github.com/hashicorp/go-getter/v2 v2.2.2
github.com/hashicorp/go-multierror v1.1.1
github.com/hetznercloud/hcloud-go/v2 v2.8.0
github.com/insomniacslk/dhcp v0.0.0-20240419123447-f1cffa2c0c49
github.com/hetznercloud/hcloud-go/v2 v2.9.0
github.com/insomniacslk/dhcp v0.0.0-20240529192340-51bc6136a0a6
github.com/jeromer/syslogparser v1.1.0
github.com/jsimonetti/rtnetlink v1.4.2
github.com/jxskiss/base62 v1.1.0
Expand All @@ -115,17 +115,17 @@ require (
github.com/pelletier/go-toml/v2 v2.2.2
github.com/pin/tftp/v3 v3.1.0
github.com/pmorjan/kmod v1.1.1
github.com/prometheus/procfs v0.14.0
github.com/rivo/tview v0.0.0-20240505185119-ed116790de0f
github.com/prometheus/procfs v0.15.1
github.com/rivo/tview v0.0.0-20240524063012-037df494fb76
github.com/rs/xid v1.5.0
github.com/ryanuber/columnize v2.1.2+incompatible
github.com/ryanuber/go-glob v1.0.0
github.com/safchain/ethtool v0.3.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.26
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.27
github.com/siderolabs/crypto v0.4.4
github.com/siderolabs/discovery-api v0.1.4
github.com/siderolabs/discovery-client v0.1.9
github.com/siderolabs/gen v0.4.8
github.com/siderolabs/gen v0.5.0
github.com/siderolabs/go-api-signature v0.3.2
github.com/siderolabs/go-blockdevice v0.4.7
github.com/siderolabs/go-blockdevice/v2 v2.0.0-20240405165836-3265299b0192
Expand All @@ -147,7 +147,7 @@ require (
github.com/siderolabs/grpc-proxy v0.4.0
github.com/siderolabs/kms-client v0.1.0
github.com/siderolabs/net v0.4.0
github.com/siderolabs/siderolink v0.3.7
github.com/siderolabs/siderolink v0.3.8
github.com/siderolabs/talos/pkg/machinery v1.8.0-alpha.0.0.20240521134552-e1711cd3c985
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
Expand All @@ -158,25 +158,25 @@ require (
github.com/vmware-tanzu/sonobuoy v0.57.1
github.com/vmware/vmw-guestinfo v0.0.0-20220317130741-510905f0efa3
github.com/vultr/metadata v1.1.0
go.etcd.io/etcd/api/v3 v3.5.13
go.etcd.io/etcd/client/pkg/v3 v3.5.13
go.etcd.io/etcd/client/v3 v3.5.13
go.etcd.io/etcd/etcdutl/v3 v3.5.13
go.etcd.io/etcd/api/v3 v3.5.14
go.etcd.io/etcd/client/pkg/v3 v3.5.14
go.etcd.io/etcd/client/v3 v3.5.14
go.etcd.io/etcd/etcdutl/v3 v3.5.14
go.uber.org/zap v1.27.0
go4.org/netipx v0.0.0-20231129151722-fdeea329fbba
golang.org/x/net v0.25.0
golang.org/x/oauth2 v0.20.0
golang.org/x/net v0.26.0
golang.org/x/oauth2 v0.21.0
golang.org/x/sync v0.7.0
golang.org/x/sys v0.20.0
golang.org/x/term v0.20.0
golang.org/x/text v0.15.0
golang.org/x/sys v0.21.0
golang.org/x/term v0.21.0
golang.org/x/text v0.16.0
golang.org/x/time v0.5.0
golang.zx2c4.com/wireguard/wgctrl v0.0.0-20230429144221-925a1e7659e6
google.golang.org/grpc v1.63.2
google.golang.org/grpc v1.64.0
google.golang.org/protobuf v1.34.1
gopkg.in/yaml.v3 v3.0.1
k8s.io/klog/v2 v2.120.1
kernel.org/pub/linux/libs/security/libcap/cap v1.2.69
kernel.org/pub/linux/libs/security/libcap/cap v1.2.70
sigs.k8s.io/yaml v1.4.0
)

Expand All @@ -198,16 +198,16 @@ require (
github.com/adrg/xdg v0.4.0 // indirect
github.com/apparentlymart/go-cidr v1.1.0 // indirect
github.com/armon/circbuf v0.0.0-20190214190532-5111143e8da2 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.11 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.5 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.5 // indirect
github.com/aws/aws-sdk-go-v2 v1.27.1 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.17 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.8 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.8 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.7 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.6 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.10 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.10 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.24.4 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.11 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/bgentry/go-netrc v0.0.0-20140422174119-9fd32a8b3d3d // indirect
github.com/briandowns/spinner v1.19.0 // indirect
Expand Down Expand Up @@ -331,10 +331,10 @@ require (
github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
go.etcd.io/bbolt v1.3.10 // indirect
go.etcd.io/etcd/client/v2 v2.305.13 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.13 // indirect
go.etcd.io/etcd/raft/v3 v3.5.13 // indirect
go.etcd.io/etcd/server/v3 v3.5.13 // indirect
go.etcd.io/etcd/client/v2 v2.305.14 // indirect
go.etcd.io/etcd/pkg/v3 v3.5.14 // indirect
go.etcd.io/etcd/raft/v3 v3.5.14 // indirect
go.etcd.io/etcd/server/v3 v3.5.14 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.51.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.51.0 // indirect
Expand All @@ -343,22 +343,22 @@ require (
go.opentelemetry.io/otel/trace v1.26.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
golang.org/x/crypto v0.23.0 // indirect
golang.org/x/crypto v0.24.0 // indirect
golang.org/x/exp v0.0.0-20240416160154-fe59bbe5cc7f // indirect
golang.org/x/mod v0.17.0 // indirect
golang.org/x/tools v0.21.0 // indirect
golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d // indirect
golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect
golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240401170217-c3f982113cda // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240509183442-62759503f434 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
k8s.io/cli-runtime v0.30.1 // indirect
k8s.io/klog v1.0.0 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20230726121419-3b25d923346b // indirect
kernel.org/pub/linux/libs/security/libcap/psx v1.2.69 // indirect
kernel.org/pub/linux/libs/security/libcap/psx v1.2.70 // indirect
rsc.io/qr v0.2.0 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
Expand Down
Loading

0 comments on commit 6cd2bed

Please sign in to comment.