To recursively walk a folder and read the folder's contents, all the sub folders, all the sub-sub folders, etc.
package main /*w ww. j a v a2 s. c o m*/ import ( "fmt" "os" "path/filepath" ) func main() { filepath.Walk(".", func(path string, info os.FileInfo, err error) error { fmt.Println(path) return nil }) }