build: fix linting issues reported by golangci-lint on windows

This commit is contained in:
albertony
2024-04-17 16:40:07 +02:00
parent fdc56b21c1
commit 159e274921
9 changed files with 21 additions and 60 deletions

View File

@ -34,7 +34,11 @@ func TestMkdirAll(t *testing.T) {
if err != nil {
t.Fatalf("create %q: %s", fpath, err)
}
defer f.Close()
defer func() {
if err := f.Close(); err != nil {
t.Fatalf("Close %q: %s", fpath, err)
}
}()
// Can't make directory named after file.
err = MkdirAll(fpath, 0777)