Merge pull request #338 from MichaelEischer/bump-go1.23

Bump minimum Go version to 1.23
This commit is contained in:
Michael Eischer
2025-04-14 21:13:59 +02:00
committed by GitHub
5 changed files with 30 additions and 16 deletions

View File

@@ -13,18 +13,30 @@ permissions:
contents: read contents: read
env: env:
latest_go: "1.23.x" latest_go: "1.24.x"
GO111MODULE: on GO111MODULE: on
jobs: jobs:
test: test:
strategy: strategy:
matrix: matrix:
go: include:
- 1.23.x - job_name: Linux
- 1.22.x go: 1.24.x
runs-on: ubuntu-latest os: ubuntu-latest
name: Go ${{ matrix.go }} check_changelog: true
- job_name: Linux (race)
go: 1.24.x
os: ubuntu-latest
test_opts: "-race"
- job_name: Linux
go: 1.23.x
os: ubuntu-latest
name: ${{ matrix.job_name }} Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
env: env:
GOPROXY: https://proxy.golang.org GOPROXY: https://proxy.golang.org
@@ -46,7 +58,7 @@ jobs:
- name: Run local Tests - name: Run local Tests
run: | run: |
go test ./... go test -cover ${{matrix.test_opts}} ./...
- name: Check changelog files with calens - name: Check changelog files with calens
run: | run: |
@@ -55,6 +67,7 @@ jobs:
echo "check changelog files" echo "check changelog files"
calens calens
if: matrix.check_changelog
lint: lint:
name: lint name: lint
@@ -76,7 +89,7 @@ jobs:
uses: golangci/golangci-lint-action@v6 uses: golangci/golangci-lint-action@v6
with: with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.63.4 version: v1.64.8
args: --verbose --timeout 5m args: --verbose --timeout 5m
# only run golangci-lint for pull requests, otherwise ALL hints get # only run golangci-lint for pull requests, otherwise ALL hints get

View File

@@ -11,7 +11,7 @@ Rest Server is a high performance HTTP server that implements restic's [REST bac
## Requirements ## Requirements
Rest Server requires Go 1.22 or higher to build. The only tested compiler is the official Go compiler. Rest Server requires Go 1.23 or higher to build. The only tested compiler is the official Go compiler.
The required version of restic backup client to use with `rest-server` is [v0.7.1](https://github.com/restic/restic/releases/tag/v0.7.1) or higher. The required version of restic backup client to use with `rest-server` is [v0.7.1](https://github.com/restic/restic/releases/tag/v0.7.1) or higher.

View File

@@ -58,7 +58,7 @@ var config = Config{
Namespace: "github.com/restic/rest-server", // subdir of GOPATH, e.g. "github.com/foo/bar" Namespace: "github.com/restic/rest-server", // subdir of GOPATH, e.g. "github.com/foo/bar"
Main: "github.com/restic/rest-server/cmd/rest-server", // package name for the main package Main: "github.com/restic/rest-server/cmd/rest-server", // package name for the main package
Tests: []string{"./..."}, // tests to run Tests: []string{"./..."}, // tests to run
MinVersion: GoVersion{Major: 1, Minor: 22, Patch: 0}, // minimum Go version supported MinVersion: GoVersion{Major: 1, Minor: 23, Patch: 0}, // minimum Go version supported
} }
// Config configures the build. // Config configures the build.

View File

@@ -1,9 +1,10 @@
Change: Update dependencies and require Go 1.22 or newer Change: Update dependencies and require Go 1.23 or newer
We have updated all dependencies. Since some libraries require newer Go standard We have updated all dependencies. Rest-server now requires Go 1.23 or newer to build.
library features, support for Go 1.18 to 1.21 has been dropped, which means
that rest-server now requires at least Go 1.22 to build.
This also disables support for TLS versions older than TLS 1.2. This also disables support for TLS versions older than TLS 1.2. On Windows,
rest-server now requires at least Windows 10 or Windows Server 2016. On macOS,
rest-server now requires at least macOS 11 Big Sur.
https://github.com/restic/rest-server/pull/322 https://github.com/restic/rest-server/pull/322
https://github.com/restic/rest-server/pull/338

2
go.mod
View File

@@ -1,6 +1,6 @@
module github.com/restic/rest-server module github.com/restic/rest-server
go 1.22 go 1.23.0
require ( require (
github.com/coreos/go-systemd/v22 v22.5.0 github.com/coreos/go-systemd/v22 v22.5.0