Skip to content

Commit

Permalink
feat: bump go to 1.24.0 (elastic#6932)
Browse files Browse the repository at this point in the history
* feat: bump go to 1.24.0

* lint: bump golangci-lint

* lint: bump golangci-lint

* Update .golangci.yml

* Update .golangci.yml

* build: bump go to 1.24.0
  • Loading branch information
kruskall authored Mar 6, 2025
1 parent d0548da commit 79c9886
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .buildkite/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ steps:
artifact_paths:
- "build/TEST-go-unit.cov"
agents:
image: "golang:1.23.6"
image: "golang:1.24.0"
depends_on:
- unit-tests
- extended-windows
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
go-version-file: .go-version

- name: golangci-lint
uses: golangci/golangci-lint-action@v6.2.0
uses: golangci/golangci-lint-action@v6.5.0
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.61.0
version: v1.64.5

# Give the job more time to execute.
# Regarding `--whole-files`, the linter is supposed to support linting of changed a patch only but,
Expand Down
2 changes: 1 addition & 1 deletion .go-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.23.6
1.24.0
5 changes: 1 addition & 4 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ linters:
- asciicheck # simple linter to check that your code does not contain non-ASCII identifiers
- bodyclose # checks whether HTTP response body is closed successfully
- durationcheck # check for two durations multiplied together
- copyloopvar # checks for unnecessary loop variable copies
- goimports # Goimports does everything that gofmt does. Additionally it checks unused imports
- gosec # inspects source code for security problems
- importas # enforces consistent import aliases
Expand Down Expand Up @@ -84,7 +83,7 @@ linters-settings:
forbid:
- fmt.Print.* # too much log noise
# Exclude godoc examples from forbidigo checks. Default is true.
exclude_godoc_examples: true
exclude-godoc-examples: true

goimports:
local-prefixes: github.com/elastic
Expand Down Expand Up @@ -131,8 +130,6 @@ linters-settings:
nolintlint:
# Enable to ensure that nolint directives are all used. Default is true.
allow-unused: false
# Disable to ensure that nolint directives don't have a leading space. Default is true.
allow-leading-space: false
# Exclude following linters from requiring an explanation. Default is [].
allow-no-explanation: []
# Enable to require an explanation of nonzero length after each nolint directive. Default is false.
Expand Down
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
mage 1.14.0
golang 1.23.6
golang 1.24.0
terraform 1.9.3
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.23.6
ARG GO_VERSION=1.24.0
FROM circleci/golang:${GO_VERSION}


Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.skaffold
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG GO_VERSION=1.23.6
ARG GO_VERSION=1.24.0
ARG crossbuild_image="docker.elastic.co/beats-dev/golang-crossbuild"
ARG AGENT_VERSION=8.9.0-SNAPSHOT
ARG AGENT_IMAGE="docker.elastic.co/beats/elastic-agent"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ check:
## check-go: download and run the go linter.
.PHONY: check-go
check-go: ## - Run golangci-lint
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.60.1
@curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.64.5
@./bin/golangci-lint run -v

## check-no-changes : Check there is no local changes.
Expand Down
2 changes: 1 addition & 1 deletion changelog/fragments/1723829102-Upgrade-to-Go-1.23.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
kind: feature

# Change summary; a 80ish characters long description of the change.
summary: Upgrade-to-Go-1.23.0
summary: Upgrade-to-Go-1.24.0

# Long description; in case the summary is not enough to describe the change
# this field accommodate a description without length limits.
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/elastic/elastic-agent

go 1.23.6
go 1.24.0

require (
github.com/Jeffail/gabs/v2 v2.6.0
Expand Down
2 changes: 1 addition & 1 deletion pkg/testing/runner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func TestNewRunner_Clean(t *testing.T) {
AgentVersion: "8.10.0",
StackVersion: "8.10.0-SNAPSHOT",
BuildDir: filepath.Join(tmpdir, "build"),
GOVersion: "1.23.6",
GOVersion: "1.24.0",
RepoDir: filepath.Join(tmpdir, "repo"),
StateDir: stateDir,
ExtraEnv: nil,
Expand Down
2 changes: 1 addition & 1 deletion version/docs/version.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// FIXME: once elastic.co docs have been switched over to use `main`, remove
// the `doc-site-branch` line below as well as any references to it in the code.
:doc-site-branch: master
:go-version: 1.23.6
:go-version: 1.24.0
:release-state: unreleased
:python: 3.7
:docker: 1.12
Expand Down

0 comments on commit 79c9886

Please sign in to comment.