diff options
author | Eng Zer Jun <engzerjun@gmail.com> | 2022-09-11 15:58:31 +0800 |
---|---|---|
committer | Eng Zer Jun <engzerjun@gmail.com> | 2022-09-11 15:58:31 +0800 |
commit | 118546c6a70704a7b19cb99f3c948b28264628de (patch) | |
tree | 5eb092820335de6860d5b5304a2a3e02f8125d03 /test/e2e/manifest_test.go | |
parent | b9cbc0c09a68be7bb55048a494753c77c08bfbd3 (diff) | |
download | podman-118546c6a70704a7b19cb99f3c948b28264628de.tar.gz podman-118546c6a70704a7b19cb99f3c948b28264628de.tar.bz2 podman-118546c6a70704a7b19cb99f3c948b28264628de.zip |
refactor: use `os.ReadDir` for lightweight directory reading
`os.ReadDir` was added in Go 1.16 as part of the deprecation of `ioutil`
package. It is a more efficient implementation than `ioutil.ReadDir`.
Reference: https://pkg.go.dev/io/ioutil#ReadDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
Diffstat (limited to 'test/e2e/manifest_test.go')
-rw-r--r-- | test/e2e/manifest_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/e2e/manifest_test.go b/test/e2e/manifest_test.go index 60b72dcaa..e38499257 100644 --- a/test/e2e/manifest_test.go +++ b/test/e2e/manifest_test.go @@ -332,7 +332,7 @@ var _ = Describe("Podman manifest", func() { blobsDir := filepath.Join(dest, "blobs", "sha256") - blobs, err := ioutil.ReadDir(blobsDir) + blobs, err := os.ReadDir(blobsDir) Expect(err).To(BeNil()) for _, f := range blobs { |