Go Directory Content Get
package main // w w w .ja va 2 s . co m import ( "fmt" "os" ) func main() { dir, err := os.Open(".") if err != nil { return } defer dir.Close() fileInfos, err := dir.Readdir(-1) if err != nil { return } for _, fi := range fileInfos { fmt.Println(fi.Name()) } }