Skip to content

Instantly share code, notes, and snippets.

@phihag
Created April 29, 2014 11:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phihag/11397245 to your computer and use it in GitHub Desktop.
Save phihag/11397245 to your computer and use it in GitHub Desktop.
Demo file for file handle count question on so
package main
import "fmt"
import "io/ioutil"
func main() {
files, _ := ioutil.ReadDir("/tmp/files")
for _, file := range files {
_, err := ioutil.ReadFile("/tmp/files/" + file.Name())
if err != nil {
fmt.Printf("[ERROR/IO]: %s | %s\n", file.Name(), err)
panic("failed")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment