Skip to content

Instantly share code, notes, and snippets.

@locona
Created June 27, 2018 08:04
Show Gist options
  • Save locona/7f269b45df3c23b45e783b096787e6cc to your computer and use it in GitHub Desktop.
Save locona/7f269b45df3c23b45e783b096787e6cc to your computer and use it in GitHub Desktop.
dir/* path list
dir := "./hour=05"
files, err := ioutil.ReadDir(dir)
if err != nil {
panic(err)
}
var paths []string
for idx := range files {
paths = append(paths, filepath.Join(dir, files[idx].Name()))
}
pp.Println(paths)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment