all: update to go version 1.23

This commit is contained in:
JukLee0ira 2025-02-12 13:48:35 +08:00 committed by Daniel Liu
parent 2b04581df2
commit 8bd1c9cee9
8 changed files with 9 additions and 11 deletions

View file

@ -55,7 +55,7 @@ jobs:
uses: actions/setup-go@v5
with:
cache: false
go-version: '1.22.x'
go-version: '1.23.x'
- name: Run tests
run: ${{ matrix.script }}
env:

View file

@ -1,4 +1,4 @@
FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git

View file

@ -1,4 +1,4 @@
FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers

View file

@ -1,4 +1,4 @@
FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add --no-cache make gcc musl-dev linux-headers git

View file

@ -8,7 +8,7 @@
GOBIN = $(shell pwd)/build/bin
GOFMT = gofmt
GO ?= 1.22.10
GO ?= 1.23.6
GORUN = go run
GO_PACKAGES = .
GO_FILES := $(shell find $(shell go list -f '{{.Dir}}' $(GO_PACKAGES)) -name \*.go)

View file

@ -121,9 +121,9 @@ func doInstall(cmdline []string) {
var minor int
fmt.Sscanf(strings.TrimPrefix(runtime.Version(), "go1."), "%d", &minor)
if minor < 21 {
if minor < 23 {
log.Println("You have Go version", runtime.Version())
log.Println("XDC requires at least Go version 1.22 and cannot")
log.Println("XDC requires at least Go version 1.23 and cannot")
log.Println("be compiled with an earlier version. Please upgrade your Go installation.")
os.Exit(1)
}

View file

@ -1,4 +1,4 @@
FROM golang:1.22-alpine as builder
FROM golang:1.23-alpine as builder
RUN apk add make build-base linux-headers

4
go.mod
View file

@ -1,8 +1,6 @@
module github.com/XinFinOrg/XDPoSChain
go 1.22
toolchain go1.22.0
go 1.23
require (
github.com/VictoriaMetrics/fastcache v1.12.2