File: example_test.go

package info (click to toggle)
golang-github-kr-fs 0.1.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, sid
  • size: 88 kB
  • sloc: makefile: 2
file content (19 lines) | stat: -rw-r--r-- 259 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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())
	}
}