Skip to content

Commit bc01288

Browse files
committed
feat: bump go to 1.23.0
use go get to update go versions in go.mod drop go requirement from readme the go requirement in the readme is less relevant since the introduction of go toolchains. It's also not accurate becaure we're requiring a patch version.
1 parent c7fc58d commit bc01288

File tree

8 files changed

+11
-29
lines changed

8 files changed

+11
-29
lines changed

.go-version

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.22.6
1+
1.23.0

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ To get started with APM, see our [Quick start guide](https://www.elastic.co/guid
1717

1818
### Requirements
1919

20-
* [Go][golang-download] 1.22.x
20+
* [Go][golang-download]
2121

2222
[golang-download]: https://golang.org/dl/
2323

cmd/intake-receiver/go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/elastic/apm-server/cmd/intake-receiver
22

3-
go 1.22
4-
5-
toolchain go1.22.1
3+
go 1.23.0
64

75
require (
86
github.com/stretchr/testify v1.6.1

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/elastic/apm-server
22

3-
go 1.22.5
3+
go 1.23.0
44

55
require (
66
github.com/cespare/xxhash/v2 v2.3.0

internal/glog/go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
module github.com/golang/glog
22

3-
go 1.22
4-
5-
toolchain go1.22.1
3+
go 1.23.0

script/update_go_version.sh

+4-14
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,10 @@ set -e
77
SDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
88
cd $SDIR/..
99

10-
# Use gimme to find the latest patch release for the major.minor
1110
# Go version defined in go.mod.
12-
GOMOD_VERSION=$(grep '^go' go.mod | cut -d' ' -f2 | cut -d. -f1-2)
11+
MAJOR_MINOR_VERSION=$(grep '^go' go.mod | cut -d' ' -f2 | cut -d. -f1-2)
1312

14-
# TODO(axw) arrange for Go 1.21+ to always be available, and stop using gimme.
15-
eval $(script/gimme/gimme $GOMOD_VERSION.x)
16-
GOVERSION=$(go env GOVERSION | sed 's/^go//')
13+
find ./ -type f -name "go.mod" -execdir go get go@$MAJOR_MINOR_VERSION \; -execdir go get toolchain@none \;
1714

18-
find -name go.mod -execdir go get toolchain@$GOVERSION \;
19-
echo $GOVERSION > .go-version
20-
sed -i "s/golang:[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/golang:$GOVERSION/" packaging/docker/Dockerfile
21-
sed -i "s/\(\[Go\]\[golang-download\]\) [[:digit:]].*/\1 $GOMOD_VERSION.x/" README.md
22-
sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" tools/go.mod
23-
sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" internal/glog/go.mod
24-
sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" go.mod
25-
sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" systemtest/go.mod
26-
sed -i "s/toolchain go[[:digit:]]\+\(\.[[:digit:]]\+\)\{1,2\}/toolchain go$GOVERSION/" cmd/intake-receiver/go.mod
15+
GO_VERSION=$(grep '^go' go.mod | cut -d' ' -f2)
16+
echo $GO_VERSION > .go-version

systemtest/go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/elastic/apm-server/systemtest
22

3-
go 1.22
4-
5-
toolchain go1.22.1
3+
go 1.23.0
64

75
require (
86
github.com/docker/docker v27.0.3+incompatible

tools/go.mod

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
module github.com/elastic/apm-server/tools
22

3-
go 1.22
4-
5-
toolchain go1.22.1
3+
go 1.23.0
64

75
require (
86
github.com/elastic/apm-tools v0.0.0-20230828065051-3f799314cc8b

0 commit comments

Comments
 (0)