-
- Downloads
There was an error fetching the commit references. Please try again later.
global: Replace trivial cases of deprecated `ioutil.ReadDir()`
With Go 1.16, the ioutil package was deprecated. In addition to being moved into the os package, `ioutil.ReadDir()` was also changed to not stat(3P) all dir entries anymore. As a result, the caller now has to do so manually. This is a performance improvement in some cases where the caller didn't require any of the file information, but really only wanted to read the directory's entries. Adapt trivial usecases of `ioutil.ReadDir()` which do not require this information with usage of `os.ReadDir()`. This leaves a few callsites of the old `ioutil.ReadDir()` function for future conversion.
Showing
- internal/cache/walker.go 1 addition, 1 deletioninternal/cache/walker.go
- internal/git/housekeeping/housekeeping.go 3 additions, 4 deletionsinternal/git/housekeeping/housekeeping.go
- internal/git/objectpool/fetch_test.go 2 additions, 2 deletionsinternal/git/objectpool/fetch_test.go
- internal/git/objectpool/link.go 1 addition, 2 deletionsinternal/git/objectpool/link.go
- internal/git/objectpool/link_test.go 1 addition, 2 deletionsinternal/git/objectpool/link_test.go
- internal/git/packfile/packfile.go 2 additions, 2 deletionsinternal/git/packfile/packfile.go
- internal/git/quarantine/quarantine.go 2 additions, 3 deletionsinternal/git/quarantine/quarantine.go
- internal/git/quarantine/quarantine_test.go 7 additions, 7 deletionsinternal/git/quarantine/quarantine_test.go
- internal/gitaly/hook/custom.go 1 addition, 2 deletionsinternal/gitaly/hook/custom.go
- internal/gitaly/maintenance/randomwalker.go 5 additions, 6 deletionsinternal/gitaly/maintenance/randomwalker.go
- internal/gitaly/service/operations/squash_test.go 1 addition, 2 deletionsinternal/gitaly/service/operations/squash_test.go
- internal/gitaly/service/ref/pack_refs_test.go 1 addition, 2 deletionsinternal/gitaly/service/ref/pack_refs_test.go
- internal/safe/file_writer_test.go 3 additions, 4 deletionsinternal/safe/file_writer_test.go
- internal/tempdir/clean_test.go 1 addition, 2 deletionsinternal/tempdir/clean_test.go
- internal/x509/pool_darwin.go 1 addition, 2 deletionsinternal/x509/pool_darwin.go
- proto/go/internal/cmd/protoc-gen-gitaly/main.go 1 addition, 2 deletionsproto/go/internal/cmd/protoc-gen-gitaly/main.go
Please register or sign in to comment