Skip to content

Instantly share code, notes, and snippets.

@178inaba
Created August 18, 2015 16:34
Show Gist options
  • Save 178inaba/7861495054003ef0689d to your computer and use it in GitHub Desktop.
Save 178inaba/7861495054003ef0689d to your computer and use it in GitHub Desktop.
file list from go
package main
import (
"fmt"
"io/ioutil"
)
func main() {
files, _ := ioutil.ReadDir("static")
for _, f := range files {
fmt.Println(f.Name())
fmt.Println("\t", f.Size())
fmt.Println("\t", f.Mode())
fmt.Println("\t", f.ModTime())
fmt.Println("\t", f.IsDir())
fmt.Println("\t", f.Sys())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment