*: bump minimum required Go version to 1.23

A part of #3553.

Signed-off-by: Anna Shaleva <shaleva.ann@nspcc.ru>
This commit is contained in:
Anna Shaleva 2025-03-21 13:04:34 +03:00
parent 3e54c46281
commit 716012623b
26 changed files with 31 additions and 31 deletions

View file

@ -53,7 +53,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.23' go-version: '1.24'
- name: Build CLI - name: Build CLI
run: make build run: make build
@ -135,7 +135,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.23' go-version: '1.24'
- name: Login to DockerHub - name: Login to DockerHub
if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }} if: ${{ github.event_name == 'release' || (github.event_name == 'workflow_dispatch' && github.event.inputs.push_image == 'true') }}

View file

@ -148,7 +148,7 @@ jobs:
- name: Set up Go - name: Set up Go
uses: actions/setup-go@v5 uses: actions/setup-go@v5
with: with:
go-version: '1.23' go-version: '1.24'
cache: true cache: true
- name: Write coverage profile - name: Write coverage profile
@ -169,16 +169,16 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ubuntu-22.04, windows-2022, macos-14] os: [ubuntu-22.04, windows-2022, macos-14]
go_versions: [ '1.22', '1.23' ] go_versions: [ '1.23', '1.24' ]
exclude: exclude:
# Only latest Go version for Windows and MacOS. # Only latest Go version for Windows and MacOS.
- os: windows-2022 - os: windows-2022
go_versions: '1.22' go_versions: '1.23'
- os: macos-14 - os: macos-14
go_versions: '1.22' go_versions: '1.23'
# Exclude latest Go version for Ubuntu as Coverage uses it. # Exclude latest Go version for Ubuntu as Coverage uses it.
- os: ubuntu-22.04 - os: ubuntu-22.04
go_versions: '1.23' go_versions: '1.24'
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4

View file

@ -1,6 +1,6 @@
# Builder image # Builder image
# Keep go version in sync with Build GA job. # Keep go version in sync with Build GA job.
FROM golang:1.23-alpine AS builder FROM golang:1.24-alpine AS builder
# Display go version for information purposes. # Display go version for information purposes.
RUN go version RUN go version

View file

@ -1,6 +1,6 @@
# Builder image # Builder image
# Keep go version in sync with Build GA job. # Keep go version in sync with Build GA job.
FROM golang:1.23.0-windowsservercore-ltsc2022 AS builder FROM golang:1.24.0-windowsservercore-ltsc2022 AS builder
COPY . /neo-go COPY . /neo-go

View file

@ -3,7 +3,7 @@ REPONAME = "neo-go"
NETMODE ?= "privnet" NETMODE ?= "privnet"
BINARY=neo-go BINARY=neo-go
BINARY_PATH=./bin/$(BINARY)$(shell go env GOEXE) BINARY_PATH=./bin/$(BINARY)$(shell go env GOEXE)
GO_VERSION ?= 1.23 GO_VERSION ?= 1.24
DESTDIR = "" DESTDIR = ""
SYSCONFIGDIR = "/etc" SYSCONFIGDIR = "/etc"
BINDIR = "/usr/bin" BINDIR = "/usr/bin"

View file

@ -51,7 +51,7 @@ NeoGo, `:latest` points to the latest release) or build yourself.
### Building ### Building
Building NeoGo requires Go 1.22+ and `make`: Building NeoGo requires Go 1.23+ and `make`:
``` ```
make make

View file

@ -417,7 +417,7 @@ func initSmartContract(ctx *cli.Context) error {
gm := []byte("module " + contractName + ` gm := []byte("module " + contractName + `
go 1.22 go 1.23
require ( require (
github.com/nspcc-dev/neo-go/pkg/interop ` + ver + ` github.com/nspcc-dev/neo-go/pkg/interop ` + ver + `

View file

@ -378,7 +378,7 @@ require (
github.com/nspcc-dev/neo-go/pkg/interop v0.0.0 github.com/nspcc-dev/neo-go/pkg/interop v0.0.0
) )
replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + ` replace github.com/nspcc-dev/neo-go/pkg/interop => ` + filepath.Join(wd, "../../pkg/interop") + `
go 1.22`) go 1.23`)
require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm)) require.NoError(t, os.WriteFile(filepath.Join(tmpDir, "go.mod"), goMod, os.ModePerm))
return filename return filename
} }

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/engine module github.com/nspcc-dev/neo-go/examples/engine
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/events module github.com/nspcc-dev/neo-go/examples/events
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/iterator module github.com/nspcc-dev/neo-go/examples/iterator
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/nft module github.com/nspcc-dev/neo-go/examples/nft
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go/examples/nft-nd-nns module github.com/nspcc-dev/neo-go/examples/nft-nd-nns
go 1.22 go 1.23
require ( require (
github.com/nspcc-dev/neo-go v0.107.3-0.20241223145705-86b2493edd6a github.com/nspcc-dev/neo-go v0.107.3-0.20241223145705-86b2493edd6a

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/nft-nd module github.com/nspcc-dev/neo-go/examples/nft-nd
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/oracle module github.com/nspcc-dev/neo-go/examples/oracle
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/runtime module github.com/nspcc-dev/neo-go/examples/runtime
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/storage module github.com/nspcc-dev/neo-go/examples/storage
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/timer module github.com/nspcc-dev/neo-go/examples/timer
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/token module github.com/nspcc-dev/neo-go/examples/token
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go/examples/zkp/cubic module github.com/nspcc-dev/neo-go/examples/zkp/cubic
go 1.22 go 1.23
require ( require (
github.com/consensys/gnark v0.12.0 github.com/consensys/gnark v0.12.0

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/examples/zkp/xor module github.com/nspcc-dev/neo-go/examples/zkp/xor
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

2
go.mod
View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go module github.com/nspcc-dev/neo-go
go 1.22 go 1.23
require ( require (
github.com/chzyer/readline v1.5.1 github.com/chzyer/readline v1.5.1

View file

@ -1,5 +1,5 @@
module github.com/nspcc-dev/neo-go/internal/examples/oracle module github.com/nspcc-dev/neo-go/internal/examples/oracle
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2

View file

@ -1,3 +1,3 @@
module github.com/nspcc-dev/neo-go/pkg/interop module github.com/nspcc-dev/neo-go/pkg/interop
go 1.22 go 1.23

View file

@ -165,7 +165,7 @@ supportedstandards: []`
// and dependency packages version needed for smart contract compilation. // and dependency packages version needed for smart contract compilation.
verifyGomod = `module verify verifyGomod = `module verify
go 1.22 go 1.23
require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2 require github.com/nspcc-dev/neo-go/pkg/interop v0.0.0-20241223145456-80e18222bca2
` `

View file

@ -1,6 +1,6 @@
module github.com/nspcc-dev/neo-go/scripts module github.com/nspcc-dev/neo-go/scripts
go 1.22 go 1.23
replace github.com/nspcc-dev/neo-go => ../ replace github.com/nspcc-dev/neo-go => ../