File: example_test.go

package info (click to toggle)
golang-github-kr-fs 0.0~git20131111.0.2788f0d-2~bpo8%2B1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 72 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())
	}
}