all: Minor staticcheck fixes (#8939)

This commit is contained in:
guangwu
2023-06-19 06:50:53 +00:00
committed by GitHub
parent 5532532db9
commit 27aba3567b
3 changed files with 3 additions and 6 deletions
+1 -1
View File
@@ -609,10 +609,10 @@ func TestRequestSymlinkWindows(t *testing.T) {
func equalContents(fs fs.Filesystem, path string, contents []byte) error {
fd, err := fs.Open(path)
defer fd.Close()
if err != nil {
return err
}
defer fd.Close()
bs, err := io.ReadAll(fd)
if err != nil {
return err