func ExampleFind_error() { err := stream.Run(stream.Find("/no_such_dir")) if err == nil { fmt.Println("stream.Find did not return expected error") } // Output: }
func ExampleFindFilter_SkipDirIf() { stream.Run( stream.Find(".").SkipDirIf(func(d string) bool { return d == ".git" }), stream.Grep("x"), stream.WriteLines(os.Stdout), ) // Output: // regexp.go // xargs.go }
func ExampleFind() { stream.Run( stream.Find(".").IfMode(os.FileMode.IsRegular), stream.Grep("stream"), stream.WriteLines(os.Stdout), ) // Output: // stream.go // stream_test.go }