Skip to content
  • Patrick Steinhardt's avatar
    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