aboutsummaryrefslogtreecommitdiff
path: root/src/path/filepath/example_unix_walk_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/path/filepath/example_unix_walk_test.go')
-rw-r--r--src/path/filepath/example_unix_walk_test.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/path/filepath/example_unix_walk_test.go b/src/path/filepath/example_unix_walk_test.go
index fa8b8e393b..66dc7f6b53 100644
--- a/src/path/filepath/example_unix_walk_test.go
+++ b/src/path/filepath/example_unix_walk_test.go
@@ -8,6 +8,7 @@ package filepath_test
import (
"fmt"
+ "io/fs"
"io/ioutil"
"os"
"path/filepath"
@@ -40,7 +41,7 @@ func ExampleWalk() {
subDirToSkip := "skip"
fmt.Println("On Unix:")
- err = filepath.Walk(".", func(path string, info os.FileInfo, err error) error {
+ err = filepath.Walk(".", func(path string, info fs.FileInfo, err error) error {
if err != nil {
fmt.Printf("prevent panic by handling failure accessing a path %q: %v\n", path, err)
return err