Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lint errors #21

Merged
merged 1 commit into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cp/cmp/cmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"reflect"
Expand Down Expand Up @@ -38,7 +37,7 @@
}

func readDirNames(path string) ([]string, error) {
entries, err := ioutil.ReadDir(path)
entries, err := os.ReadDir(path)

Check warning on line 40 in cp/cmp/cmp.go

View check run for this annotation

Codecov / codecov/patch

cp/cmp/cmp.go#L40

Added line #L40 was not covered by tests
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -80,7 +79,7 @@
if err != nil {
return err
}
// ioutil.ReadDir guarantees these are sorted.
// os.ReadDir guarantees these are sorted.
if !reflect.DeepEqual(srcEntries, dstEntries) {
return fmt.Errorf("directory contents did not match:\n%q had %v\n%q had %v", src, srcEntries, dst, dstEntries)
}
Expand Down
1 change: 1 addition & 0 deletions uio/archivereader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ func TestArchiveReaderPreReadShort(t *testing.T) {

// randomString generates random string of fixed length in a fast and simple way.
func randomString(l int) string {
//nolint
rand.Seed(time.Now().UnixNano())
r := make([]byte, l)
for i := 0; i < l; i++ {
Expand Down
Loading