I am dealing with a rather large amount of files in a given directory. I need to get a list of all files but I find for loops to be too slow.
Is there any way I can list files in a directory without using a for loop?
files, err := filepath.Glob(path + "*.xyz")
works nicely for me.
2.1m questions
2.1m answers
60 comments
57.0k users