Codebase list golang-github-kr-fs / 8ff64848-5095-489e-bf43-ca51003b1f10/main example_test.go
8ff64848-5095-489e-bf43-ca51003b1f10/main

Tree @8ff64848-5095-489e-bf43-ca51003b1f10/main (Download .tar.gz)

example_test.go @8ff64848-5095-489e-bf43-ca51003b1f10/mainraw · history · blame

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())
	}
}