Enable staticcheck, fix issues (#542)

This commit is contained in:
Toni Spets
2023-12-15 22:07:22 +02:00
committed by GitHub
parent 1a96ad4389
commit 6824eb61a8
8 changed files with 29 additions and 35 deletions

View File

@@ -4,7 +4,6 @@ import (
"context"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"sort"
@@ -112,7 +111,7 @@ func (c *ReplicaClient) Generations(ctx context.Context) ([]string, error) {
return nil, fmt.Errorf("cannot determine generations path: %w", err)
}
fis, err := ioutil.ReadDir(root)
fis, err := os.ReadDir(root)
if os.IsNotExist(err) {
return nil, nil
} else if err != nil {