summaryrefslogtreecommitdiff
path: root/pkg/machine/ignition.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2022-03-28 15:14:19 +0200
committerGitHub <noreply@github.com>2022-03-28 15:14:19 +0200
commite1699d8591ab87717ae018583c896561c43efb29 (patch)
treef9ce0e691659969510b13714b047c3af49a5ed80 /pkg/machine/ignition.go
parentaeae59804990e98fea6cd64388c99a1d863a7cb5 (diff)
parentd106b294b428fbb10f59d4cafe72c3dcaa4e73bb (diff)
downloadpodman-e1699d8591ab87717ae018583c896561c43efb29.tar.gz
podman-e1699d8591ab87717ae018583c896561c43efb29.tar.bz2
podman-e1699d8591ab87717ae018583c896561c43efb29.zip
Merge pull request #13668 from rhatdan/walk
Switch all calls to filepath.Walk to filepath.WalkDir
Diffstat (limited to 'pkg/machine/ignition.go')
-rw-r--r--pkg/machine/ignition.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/machine/ignition.go b/pkg/machine/ignition.go
index b2dabb689..fe47437e3 100644
--- a/pkg/machine/ignition.go
+++ b/pkg/machine/ignition.go
@@ -6,6 +6,7 @@ package machine
import (
"encoding/json"
"fmt"
+ "io/fs"
"io/ioutil"
"net/url"
"os"
@@ -507,8 +508,8 @@ func getCerts(certsDir string, isDir bool) []File {
)
if isDir {
- err := filepath.Walk(certsDir, func(path string, info os.FileInfo, err error) error {
- if err == nil && !info.IsDir() {
+ err := filepath.WalkDir(certsDir, func(path string, d fs.DirEntry, err error) error {
+ if err == nil && !d.IsDir() {
certPath, err := filepath.Rel(certsDir, path)
if err != nil {
logrus.Warnf("%s", err)