github.com/goplusjs/gopherjs@v1.2.6-0.20211206034512-f187917453b8/compiler/natives/src/path/filepath/example_unix_walk_test.go (about)

     1  // +build js
     2  // +build !windows,!plan9
     3  
     4  package filepath_test
     5  
     6  import (
     7  	"fmt"
     8  )
     9  
    10  func ExampleWalk() {
    11  	fmt.Print(`On Unix:
    12  visited file or dir: "."
    13  visited file or dir: "dir"
    14  visited file or dir: "dir/to"
    15  visited file or dir: "dir/to/walk"
    16  skipping a dir without errors: skip`)
    17  	// Output:
    18  	// On Unix:
    19  	// visited file or dir: "."
    20  	// visited file or dir: "dir"
    21  	// visited file or dir: "dir/to"
    22  	// visited file or dir: "dir/to/walk"
    23  	// skipping a dir without errors: skip
    24  }