Skip to content
Snippets Groups Projects
Select Git revision
  • kn-fix-migration-context
  • master default protected
  • sh-limit-praefect-connection-age
  • ec/raft-snapshotting-streaming
  • qmnguyen0711/backfill-missing-fsync-when-writing-manifest
  • qmnguyen0711/integrate-etcd-raft-with-transactions-v2
  • eju/gitaly/6506/6640/prepare-offloading
  • activate-bundle-uri-generation
  • jc/my-branch
  • mbayar/bump-minimum-go-version
  • 6270-restore-partition
  • 6628-persistent-routing-table
  • jliu/bump-module-version-to-v17
  • eju/gitaly/6539/offloading-helper-cache-alternate-entry
  • mb-fix-crypto-vuln
  • 17-7-stable protected
  • 17-8-stable protected
  • 17-9-stable protected
  • feat/repo-assignment-migration
  • gitaly-renovate-tools/golangci-lint/golang.org-x-tools-0.x
  • v17.7.6 protected
  • v17.8.4 protected
  • v17.9.1 protected
  • v17.8.3 protected
  • v17.7.5 protected
  • v17.9.0 protected
  • v17.9.0-rc42 protected
  • v17.6.5 protected
  • v17.7.4 protected
  • v17.8.2 protected
  • v17.6.4 protected
  • v17.7.3 protected
  • v17.8.1 protected
  • v17.8.0 protected
  • v17.7.2 protected
  • v17.8.0-rc42 protected
  • v17.5.5 protected
  • v17.6.3 protected
  • v17.7.1 protected
  • v17.7.0 protected
40 results

link.go

  • Patrick Steinhardt's avatar
    4d63c8f0
    global: Replace trivial cases of deprecated `ioutil.ReadDir()` · 4d63c8f0
    Patrick Steinhardt authored
    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.
    4d63c8f0
    History
    global: Replace trivial cases of deprecated `ioutil.ReadDir()`
    Patrick Steinhardt authored
    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.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.