Merge pull request #22121 from MichaelEischer/go-1.27

bump minimum go version to 1.26
This commit is contained in:
Michael Eischer
2026-10-18 15:16:28 +02:00
committed by GitHub
9 changed files with 15 additions and 19 deletions
-5
View File
@@ -49,11 +49,6 @@ jobs:
os: ubuntu-latest
test_fuse: true
- job_name: Linux
go: 1.25.x
os: ubuntu-latest
test_fuse: true
name: ${{ matrix.job_name }} Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
+1 -1
View File
@@ -59,7 +59,7 @@ var config = Config{
// see https://github.com/googleapis/google-cloud-go/issues/11448
DefaultBuildTags: []string{"selfupdate", "disable_grpc_modules"}, // specify build tags which are always used
Tests: []string{"./..."}, // tests to run
MinVersion: GoVersion{Major: 1, Minor: 25, Patch: 0}, // minimum Go version supported
MinVersion: GoVersion{Major: 1, Minor: 26, Patch: 0}, // minimum Go version supported
}
// Config configures the build.
+5
View File
@@ -0,0 +1,5 @@
Change: Require Go 1.26 or newer
Building restic now requires Go 1.26 or newer.
https://github.com/restic/restic/pull/22121
+1 -1
View File
@@ -305,7 +305,7 @@ From source
***********
restic is written in the Go programming language and you need at least
Go version 1.25. Building restic may also work with older versions of Go,
Go version 1.26. Building restic may also work with older versions of Go,
but that's not supported. See the `Getting
started <https://go.dev/doc/install>`__ guide of the Go project for
instructions how to install Go.
+2 -2
View File
@@ -1,8 +1,8 @@
module github.com/restic/restic
go 1.25.8
go 1.26.0
toolchain go1.25.10
toolchain go1.26.9
// keep the old behavior for reparse points on windows until handling reparse points has been improved in restic
// https://forum.restic.net/t/windows-junction-backup-with-go1-23-or-later/8940
+2 -2
View File
@@ -625,8 +625,8 @@ func (r *SFTP) Close() error {
return err
}
// get the error, but ignore it
<-r.result
//nolint:staticcheck // get the error, but ignore it
_ = <-r.result
return nil
}
+1 -1
View File
@@ -545,7 +545,7 @@ func (s *Suite[C]) TestSave(t *testing.T) {
}
if fi.Size != int64(len(data)) {
t.Errorf("Stat() returned different size, want %q, got %d", len(data), fi.Size)
t.Errorf("Stat() returned different size, want %d, got %d", len(data), fi.Size)
}
err = b.Remove(context.TODO(), h)
+1 -3
View File
@@ -468,9 +468,7 @@ func OSAttrsToGenericAttributes(attributeType reflect.Type, attributeValuePtr *r
attrs = make(map[GenericAttributeType]json.RawMessage)
// Iterate over the fields of the struct
for i := 0; i < attributeType.NumField(); i++ {
field := attributeType.Field(i)
for field := range attributeType.Fields() {
// Get the field value using reflection
fieldValue := attributeValue.FieldByName(field.Name)
+2 -4
View File
@@ -25,11 +25,9 @@ func TestRestorePrivilegeBypassACL(t *testing.T) {
testPath := testGetRestrictedFilePath(t)
// Writable OpenFile needs explicit FILE_FLAG_BACKUP_SEMANTICS.
// Go with issue #73676 merged would allow: os.OpenFile(testPath, os.O_WRONLY|windows.O_FILE_FLAG_BACKUP_SEMANTICS, 0)
utf16Path := windows.StringToUTF16Ptr(testPath)
handle, err := windows.CreateFile(utf16Path, windows.GENERIC_WRITE, 0, nil, windows.OPEN_EXISTING, windows.FILE_ATTRIBUTE_NORMAL|windows.FILE_FLAG_BACKUP_SEMANTICS, 0)
testfile, err := os.OpenFile(testPath, os.O_WRONLY|windows.O_FILE_FLAG_BACKUP_SEMANTICS, 0)
test.OK(t, errors.Wrapf(err, "failed to open file for writing: %s", testPath))
test.OK(t, windows.Close(handle))
test.OK(t, testfile.Close())
}
func testGetRestrictedFilePath(t *testing.T) string {