Apply go fix -any ./...

This commit is contained in:
Michael Eischer
2026-07-22 22:25:18 +02:00
parent d4088aa09b
commit 32e9869cc8
63 changed files with 197 additions and 197 deletions
+3 -3
View File
@@ -39,7 +39,7 @@ func findHash(buf []byte, filename string) (hash []byte, err error) {
return nil, fmt.Errorf("hash for file %v not found", filename)
}
func extractToFile(buf []byte, filename, target string, printf func(string, ...interface{})) error {
func extractToFile(buf []byte, filename, target string, printf func(string, ...any)) error {
var rd io.Reader = bytes.NewReader(buf)
switch filepath.Ext(filename) {
case ".bz2":
@@ -112,9 +112,9 @@ func extractToFile(buf []byte, filename, target string, printf func(string, ...i
// DownloadLatestStableRelease downloads the latest stable released version of
// restic and saves it to target. It returns the version string for the newest
// version. The function printf is used to print progress information.
func DownloadLatestStableRelease(ctx context.Context, target, currentVersion string, printf func(string, ...interface{})) (version string, err error) {
func DownloadLatestStableRelease(ctx context.Context, target, currentVersion string, printf func(string, ...any)) (version string, err error) {
if printf == nil {
printf = func(string, ...interface{}) {}
printf = func(string, ...any) {}
}
printf("find latest release of restic at GitHub\n")
+1 -1
View File
@@ -11,7 +11,7 @@ import (
)
func TestExtractToFileZip(t *testing.T) {
printf := func(string, ...interface{}) {}
printf := func(string, ...any) {}
dir := t.TempDir()
ext := "zip"
+1 -1
View File
@@ -156,7 +156,7 @@ func getGithubData(ctx context.Context, url string) ([]byte, error) {
return buf, nil
}
func getGithubDataFile(ctx context.Context, assets []Asset, suffix string, printf func(string, ...interface{})) (filename string, data []byte, err error) {
func getGithubDataFile(ctx context.Context, assets []Asset, suffix string, printf func(string, ...any)) (filename string, data []byte, err error) {
var url string
for _, a := range assets {
if strings.HasSuffix(a.Name, suffix) {