2
2
mirror of https://github.com/octoleo/restic.git synced 2024-11-12 16:26:34 +00:00
restic/vendor/github.com/kr/fs/example_test.go

20 lines
259 B
Go
Raw Normal View History

2017-07-23 12:24:45 +00:00
package fs_test
import (
"fmt"
"os"
"github.com/kr/fs"
)
func ExampleWalker() {
walker := fs.Walk("/usr/lib")
for walker.Step() {
if err := walker.Err(); err != nil {
fmt.Fprintln(os.Stderr, err)
continue
}
fmt.Println(walker.Path())
}
}