aboutsummaryrefslogtreecommitdiff
path: root/pkg/api
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-09-12 06:50:48 +0200
committerGitHub <noreply@github.com>2022-09-12 06:50:48 +0200
commit1635fe8620fa454647cf7db2af9ed0c9b52eacfb (patch)
tree814768e6b942e199a6974e2f60a7082a004def18 /pkg/api
parent940d3d889221e21cc24705381b2c2d11d75f39bf (diff)
parent118546c6a70704a7b19cb99f3c948b28264628de (diff)
downloadpodman-1635fe8620fa454647cf7db2af9ed0c9b52eacfb.tar.gz
podman-1635fe8620fa454647cf7db2af9ed0c9b52eacfb.tar.bz2
podman-1635fe8620fa454647cf7db2af9ed0c9b52eacfb.zip
Merge pull request #15737 from Juneezee/refactor/os.ReadDir
refactor: use `os.ReadDir` for lightweight directory reading
Diffstat (limited to 'pkg/api')
-rw-r--r--pkg/api/handlers/compat/info.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/pkg/api/handlers/compat/info.go b/pkg/api/handlers/compat/info.go
index d82513284..60bbd40fe 100644
--- a/pkg/api/handlers/compat/info.go
+++ b/pkg/api/handlers/compat/info.go
@@ -2,7 +2,6 @@ package compat
import (
"fmt"
- "io/ioutil"
"net/http"
"os"
goRuntime "runtime"
@@ -198,7 +197,7 @@ func getRuntimes(configInfo *config.Config) map[string]docker.Runtime {
func getFdCount() (count int) {
count = -1
- if entries, err := ioutil.ReadDir("/proc/self/fd"); err == nil {
+ if entries, err := os.ReadDir("/proc/self/fd"); err == nil {
count = len(entries)
}
return