Skip to content

Commit

Permalink
chore: Build with go 1.22
Browse files Browse the repository at this point in the history
  • Loading branch information
mrueg committed Apr 4, 2024
1 parent d4ae486 commit 7ba8ef5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ env:
E2E_SETUP_KIND: yes
E2E_SETUP_KUBECTL: yes
SUDO: sudo
GO_VERSION: "^1.21"
GOLANGCI_LINT_VERSION: "v1.54.2"
GO_VERSION: "^1.22"
GOLANGCI_LINT_VERSION: "v1.57.2"

jobs:
ci-go-lint:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/govulncheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- cron: '0 0 * * 1'

env:
GO_VERSION: "^1.21"
GO_VERSION: "^1.22"

permissions:
contents: read
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GOVERSION=1.21
ARG GOVERSION=1.22
ARG GOARCH
FROM golang:${GOVERSION} as builder
ARG GOARCH
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ OS ?= $(shell uname -s | tr A-Z a-z)
ALL_ARCH = amd64 arm arm64 ppc64le s390x
PKG = github.com/prometheus/common
PROMETHEUS_VERSION = 2.46.0
GO_VERSION = 1.21.8
GO_VERSION = 1.22.2
IMAGE = $(REGISTRY)/kube-state-metrics
MULTI_ARCH_IMG = $(IMAGE)-$(ARCH)
USER ?= $(shell id -u -n)
Expand Down
2 changes: 1 addition & 1 deletion pkg/metrics_store/metrics_writer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ func TestWriteAllWithMultipleStores(t *testing.T) {

// TestWriteAllWithEmptyStores checks that nothing is printed if no metrics exist for metric families.
func TestWriteAllWithEmptyStores(t *testing.T) {
genFunc := func(obj interface{}) []metric.FamilyInterface {
genFunc := func(_ interface{}) []metric.FamilyInterface {
mf1 := metric.Family{
Name: "kube_service_info_1",
Metrics: []*metric.Metric{},
Expand Down
4 changes: 2 additions & 2 deletions pkg/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func NewOptions() *Options {
func (o *Options) AddFlags(cmd *cobra.Command) {
o.cmd = cmd

completionCommand.SetHelpFunc(func(cmd *cobra.Command, args []string) {
completionCommand.SetHelpFunc(func(_ *cobra.Command, args []string) {

Check failure on line 86 in pkg/options/options.go

View workflow job for this annotation

GitHub Actions / ci-go-lint

unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
if shellPath, ok := os.LookupEnv("SHELL"); ok {
shell := shellPath[strings.LastIndex(shellPath, "/")+1:]
fmt.Println(FetchLoadInstructions(shell))
Expand All @@ -97,7 +97,7 @@ func (o *Options) AddFlags(cmd *cobra.Command) {
versionCommand := &cobra.Command{
Use: "version",
Short: "Print version information.",
Run: func(cmd *cobra.Command, args []string) {
Run: func(_ *cobra.Command, args []string) {

Check failure on line 100 in pkg/options/options.go

View workflow job for this annotation

GitHub Actions / ci-go-lint

unused-parameter: parameter 'args' seems to be unused, consider removing or renaming it as _ (revive)
fmt.Printf("%s\n", version.Print("kube-state-metrics"))
klog.FlushAndExit(klog.ExitFlushTimeout, 0)
},
Expand Down

0 comments on commit 7ba8ef5

Please sign in to comment.