mirror of
https://github.com/rclone/rclone.git
synced 2024-12-26 00:49:22 +01:00
20 lines
259 B
Go
20 lines
259 B
Go
|
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())
|
||
|
}
|
||
|
}
|